...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::functional::as_env — A unary PolymorphicFunctionObject for ensuring that an object is a transform environment. If it isn't already, it is turned into one such that the object is associated with the proto::data_type key.
// In header: <boost/proto/transform/env.hpp> struct as_env : proto::callable { // member classes/structs/unions template<typename Sig> struct result { // types typedefsee-below
type; }; // public member functions template<typename T>see-below
operator()(T &) const; template<typename T>see-below
operator()(T const &) const; };
as_env
public member functionstemplate<typename T>see-below
operator()(T & t) const; template<typename T>see-below
operator()(T const & t) const;
If proto::is_env<T>::value
is false
,
this function returns the result of (proto::data = t)
.
See proto::data_type::operator=
for details.
Otherwise, this function returns t
by reference.