...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
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.
// 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; };
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 functionstemplate<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
,
where cv
&>(value)
is cv
const
for the second overload, and empty
for the first.
Otherwise, this function returns env<data_type, Value>(value)
.