Struct _byrefboost::proto::_byref — A unary callable PolymorphicFunctionObject that wraps its argument
in a Synopsisstruct _byref : proto::callable { template<typename This, typename T> struct result<This(T &)> { // types typedef boost::reference_wrapper< T > const type; }; template<typename This, typename T> struct result<This(T)> { // types typedef boost::reference_wrapper< T const > const type; }; // public member functions template<typename T> boost::reference_wrapper< T > const operator()(T &) const; template<typename T> boost::reference_wrapper< T const > const operator()(T const &) const; }; DescriptionExample: proto::terminal<int>::type i = {42}; boost::reference_wrapper<proto::terminal<int>::type> j = proto::when<proto::_, proto::_byref(_)>()(i); assert( boost::addressof(i) == boost::addressof(j.get()) );
|
Parameters: |
|
||
Returns: |
|
||
Throws: |
Will not throw. |
template<typename T> boost::reference_wrapper< T const > const operator()(T const & t) const;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.