Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct _data

boost::proto::_data — A PrimitiveTransform that returns the current data unmodified.

Synopsis

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


struct _data :  proto::transform< _data > {
  // member classes/structs/unions
  template<typename Expr, typename State, typename Data> 
  struct impl :  proto::transform_impl< Expr, State, Data > {
    // types
    typedef Data result_type;

    // public member functions
    Data operator()(typename impl::expr_param, typename impl::state_param, 
                    typename impl::data_param) const;
  };
};

Description

Example:

proto::terminal<int>::type i = {42};
std::string str("hello");
std::string & data = proto::_data()(i, 'a', str);
assert( &str == &data );


PrevUpHomeNext