Logo MTL4

mtl::make_in_copy_or_reference< Target, Source > Struct Template Reference

Helper class to avoid avoidable copies for input parameters. More...

#include <make_copy_or_reference.hpp>

List of all members.


Detailed Description

template<typename Target, typename Source>
struct mtl::make_in_copy_or_reference< Target, Source >

Helper class to avoid avoidable copies for input parameters.

Container is referred if it has already target type, otherwise copied. Create an object of this type and pass the value member variable to the function, e.g. make_in_copy_or_reference<Tgt, Src> copy_or_ref(v); f(copy_or_ref.value); where Src is the type of v and Tgt the type of f's argument.


The documentation for this struct was generated from the following file:


mtl::make_in_copy_or_reference< Target, Source > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Gen. with rev. 7542 on 7 Apr 2011 by doxygen 1.5.9 -- © 2010 by SimuNova UG.