boost::mixin::object_of — gets the object of a mixin
// In header: <boost/mixin/mixin.hpp> template<typename Mixin> object * object_of(Mixin * mixin_addr);
Returns the owning object of a given mixin.
![]() |
Warning |
---|---|
This function just makes a pointer offset and cast. It will work with any object that's been given to it without a warning or an error. Even, say |
Example:
mymixin* ptr = myobject->get<mymixin>(); object_of(ptr); // == myobject
See Also:
bm_this
Parameters: |
|
||
Returns: |
A pointer to the object of the given mixin |