Allows to make managed copies of instances of Object. More...
#include </home/chochlik/devel/oglplus/include/oglplus/object/reference.hpp>
Inherits oglplus::Object< ObjectOps >.
Allows to make managed copies of instances of Object.
For obvious reasons objects are not copyable, only movable. There may however be situations where a temporary reference to the "master" object (with the knowledge that the original will be kept alive during the whole lifetime of the copy) is needed. The Reference template class allows to do such temporary references which have the same members and friend functions as the original object, and can be use in the same way, provided that the original instance is not destroyed before the managed copy.
Instances of Reference are may be for example created when accessing or iterating through the elements of an Sequence.