...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::env_var — A unary PolymorphicFunctionObject used for fetching the value associated with a particular key in a transform environment.
// In header: <boost/proto/transform/env.hpp> template<typename Key> struct env_var : proto::callable { // member classes/structs/unions template<typename Sig> struct result { // types typedefsee-below
type; }; // public member functions template<typename Env>see-below
operator()(Env const &) const; };
env_var
public member functionstemplate<typename Env> see-below
operator()(Env const & e) const;
This function behaves as follows:
Key
is proto::data_type
:
proto::is_env<Env>::value
is true
,
return e[proto::data]
.
e
.
e[Key()]
.
See proto::env::operator[]
for additional information.