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
This is an older version of Boost and was released in 2019. The current version is 1.89.0.
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-belowtype; }; // public member functions template<typename T>see-belowoperator()(T &) const; template<typename T>see-belowoperator()(T const &) const; };
as_env public member functionstemplate<typename T>see-belowoperator()(T & t) const; template<typename T>see-belowoperator()(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.