Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Struct data_type

boost::proto::data_type — The type of proto::data, a key for use when creating a transform environment that associates a piece of data with this type.

Synopsis

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


struct data_type {

  // public member functions
  template<typename Value> env<data_type, see-below> operator=(Value &) const;
  template<typename Value> 
    env<data_type, see-below> operator=(Value const &) const;
};

Description

The proto::data_type type, along with the proto::data global, are declared using the BOOST_PROTO_DEFINE_ENV_VAR() macro.

data_type public member functions

  1. template<typename Value> 
      env<data_type, see-below> operator=(Value & value) const;
    template<typename Value> 
      env<data_type, see-below> operator=(Value const & value) const;

    If Value is a specialization boost::reference_wrapper<T>, this function returns env<data_type, T &>(value.get()).

    Else, if the type Value is non-copyable (i.e., a function, an array, abstract, or an ostream), this function returns env<data_type, Value cv &>(value), where cv is const for the second overload, and empty for the first.

    Otherwise, this function returns env<data_type, Value>(value).


PrevUpHomeNext