How are template arguments to rbtree_best_fit resolved

I am stepping through interprocess shared memory code and I was a little confused by the offset_ptr code that I was hitting. I cannot figure out how that is specified to the template of rbtree_best_fit. I see in boost/interprocess/interprocess_fwd.hpp declaring managed_shared_memory by typedef'ing basic_managed_shared_memory with rbtree_best_fit

El 15/03/2010 23:26, Eric Whitcombe escribió:
I am stepping through interprocess shared memory code and I was a little confused by the offset_ptr code that I was hitting. I cannot figure out how that is specified to the template of rbtree_best_fit. I see in boost/interprocess/interprocess_fwd.hpp declaring managed_shared_memory by typedef'ing basic_managed_shared_memory with rbtree_best_fit
as the AllocationAlgorithm argument but I can't figure out how offset_ptr is is supplied as the VoidPointer argument to the rbtree_best_fit template. That template has 3 arguments but the forward declaration only provides one. Are the other two somehow inferred? If so, how?
There is a predeclaration for rbtree_best_fit in interprocess_fwd.hpp
specifying default arguments
//////////////////////////////////////////////////
// Memory allocation algorithms
//////////////////////////////////////////////////
//...
template
participants (2)
-
Eric Whitcombe
-
Ion Gaztañaga