Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct _byref

boost::proto::_byref — A unary callable PolymorphicFunctionObject that wraps its argument in a boost::reference_wrapper<>.

Synopsis

// In header: <boost/proto/transform/arg.hpp>


struct _byref :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename T> 
  struct result<> {
    // types
    typedef  ;
  };
  template<typename This, typename T> 
  struct result<> {
    // types
    typedef  ;
  };

  // public member functions
  template<typename T> 
     () ;
  template<typename T> 
     () ;
};

Description

Example:

proto::terminal<proto::terminal<proto::when<proto::_, 

_byref public member functions

  1. template<typename T> 
       ( t) ;

    Wrap the parameter t in a boost::reference_wrapper<>

    Parameters:

    t

    The object to wrap

    Returns:

    boost::ref(t)

    Throws:

    Will not throw.
  2. template<typename T> 
       ( t) ;

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


PrevUpHomeNext