Struct _byvalboost::proto::_byval —
A unary callable PolymorphicFunctionObject that strips references and
Synopsisstruct _byval : proto::callable { template<typename This, typename T> struct result<This(boost::reference_wrapper< T >)> : result<This(T)> { }; template<typename This, typename T> struct result<This(T &)> : result<This(T)> { }; template<typename This, typename T> struct result<This(T)> { // types typedef T type; }; // public member functions template<typename T> T operator()(T const &) const; template<typename T> T operator()(boost::reference_wrapper< T > const &) const; }; DescriptionExample: proto::terminal<int>::type i = {42}; int j = 67; int k = proto::when<proto::_, proto::_byval(proto::_state)>()(i, boost::ref(j)); assert( 67 == k );
|
Parameters: |
|
||
Returns: |
|
||
Throws: |
Will not throw. |
template<typename T> T operator()(boost::reference_wrapper< 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.