Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template binding

boost::type_erasure::binding

Synopsis

// In header: <boost/type_erasure/binding.hpp>

template<typename Concept> 
class binding {
public:
  // construct/copy/destruct
  ();
  template<typename Map> ();
  template<typename Map> (static_binding< );
  template<typename Concept2, typename Map> 
    (binding< , );
  template<typename Concept2, typename Map> 
    (binding< , static_binding< );
  template<typename Placeholders, typename Map> 
    (dynamic_binding< , 
            static_binding< );

  // friend functions
   (binding &, binding &);
   (binding &, binding &);
};

Description

Stores the binding of a Concept to a set of actual types. Concept is interpreted in the same way as with any.

binding public construct/copy/destruct

  1. ();

    Requires:

    relaxed must be in Concept.

    Throws:

    Nothing.
  2. template<typename Map> ();

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept.

    Throws:

    Nothing.
  3. template<typename Map> (static_binding< );

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept.

    Throws:

    Nothing.
  4. template<typename Concept2, typename Map> 
      (binding<  other, );

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc
  5. template<typename Concept2, typename Map> 
      (binding<  other, static_binding< );

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc
  6. template<typename Placeholders, typename Map> 
      (dynamic_binding<  other, 
              static_binding< );

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc

binding friend functions

  1.  (binding & lhs, binding & rhs);

    Returns:

    true iff the sets of types that the placeholders bind to are the same for both arguments.

    Throws:

    Nothing.
  2.  (binding & lhs, binding & rhs);

    Returns:

    true iff the arguments do not map to identical sets of types.

    Throws:

    Nothing.

PrevUpHomeNext