Boost Ref library is a small library that is useful for passing references to function templates (algorithms) that would usually take copies of their arguments
Boost Ref Library defines:
- the class template
boost::reference_wrapper<T> - two functions
boost::refandboost::crefthat return instances ofboost::reference_wrapper<T> - a function
boost::unwrap_refthat unwraps aboost::reference_wrapper<T>or returns a reference to any other type of object - two traits classes
boost::is_reference_wrapper<T>and boost::unwrap_reference`.
Further details: