| Home | Libraries | People | FAQ | More

## Struct template has_env_var

boost::proto::functional::has_env_var — A unary boolean PolymorphicFunctionObject used for determining whether a particular transform environment has a value associated with a particular key.

## Synopsis

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

    template<typename Key>
    struct has_env_var :  proto::callable {
      // member classes/structs/unions
      template<typename Sig>
      struct result {
        // types
        typedef see-below type;
      };

      // public member functions
      template<typename Env> see-below operator()(Env const &) const;
    };

## Description

### `has_env_var` public member functions

1.     template<typename Env> see-below operator()(Env const & e) const;

   This function behaves as follows:

   - If `proto::is_env<Env>::value` is `true`:
     - If `e[Key()]` returns an instance of `proto::key_not_found`, return `mpl::false_`. See `proto::env::operator[]` for more information.
     - Otherwise, return `mpl::true_`.
   - Otherwise:
     - If `Key` is `proto::data_type`, return `mpl::true_`.
     - Otherwise, return `mpl::false_`.