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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template named_parameter

boost::nfp::named_parameter

Synopsis

// In header: <boost/test/utils/named_params.hpp>

template<typename T, typename unique_id, typename RefType = T&> 
struct named_parameter {
  // types
  typedef T         data_type;
  typedef RefType   ref_type; 
  typedef unique_id id;       

  // construct/copy/destruct
  explicit named_parameter(ref_type);
  named_parameter(named_parameter const &);

  // public member functions
  ref_type operator[](keyword< unique_id, true >) const;
  ref_type operator[](keyword< unique_id, false >) const;
  template<typename UnknownId> 
    nil operator[](keyword< UnknownId, false >) const;
  bool has(keyword< unique_id, false >) const;
  template<typename UnknownId> bool has(keyword< UnknownId, false >) const;
  void erase(keyword< unique_id, false >) const;
  template<typename UnknownId> void erase(keyword< UnknownId, false >) const;
  template<typename Visitor> void apply_to(Visitor &) const;
  named_parameter_combine< NP, named_parameter< T, unique_id, RefType > > 
  operator,(NP const &) const;
};

Description

named_parameter public construct/copy/destruct

  1. explicit named_parameter(ref_type v);
  2. named_parameter(named_parameter const & np);

named_parameter public member functions

  1. ref_type operator[](keyword< unique_id, true >) const;
  2. ref_type operator[](keyword< unique_id, false >) const;
  3. template<typename UnknownId> nil operator[](keyword< UnknownId, false >) const;
  4. bool has(keyword< unique_id, false >) const;
  5. template<typename UnknownId> bool has(keyword< UnknownId, false >) const;
  6. void erase(keyword< unique_id, false >) const;
  7. template<typename UnknownId> void erase(keyword< UnknownId, false >) const;
  8. template<typename Visitor> void apply_to(Visitor & V) const;
  9. named_parameter_combine< NP, named_parameter< T, unique_id, RefType > > 
    operator,(NP const & np) const;

PrevUpHomeNext