Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template any<, >

boost::type_erasure::any<Concept, const T &>

Synopsis

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

template<typename Concept, typename T> 
class any<, > {
public:
  // construct/copy/destruct
  template<typename U> (const U &);
  template<typename U, typename Map> 
    (const U &, const static_binding< Map > &);
  (const any &);
  (const any< Concept, T & > &);
  (const any< Concept, T > &);
  (const any< Concept, T && > &);
  template<typename Concept2, typename Tag2> 
    (const any< Concept2, Tag2 > &);
  template<typename Concept2, typename Tag2, typename Map> 
    (const any< Concept2, Tag2 > &, const static_binding< Map > &);
  template<typename Concept2, typename Tag2> 
    (const any< Concept2, Tag2 > &, const binding< Concept > &);
  any & (const any &);
  template<typename U> any & (const U &);
};

Description

any public construct/copy/destruct

  1. template<typename U> (const U & arg);

    Constructs an any from a reference.

    Parameters:

    arg

    The object to bind the reference to.

    Requires:

    U is a model of Concept.

    Requires:

    Concept must not refer to any non-deduced placeholder besides T.

    Throws:

    Nothing.
  2. template<typename U, typename Map> 
      (const U & arg, const static_binding< Map > & binding);

    Constructs an any from a reference.

    Parameters:

    arg

    The object to bind the reference to.

    binding

    Specifies the actual types that all the placeholders should bind to.

    Requires:

    U is a model of Concept.

    Requires:

    Map is an MPL map with an entry for every non-deduced placeholder referred to by Concept.

    Throws:

    Nothing.
  3. (const any & other);

    Constructs an any from another any.

    Parameters:

    other

    The reference to copy.

    Throws:

    Nothing.
  4. (const any< Concept, T & > & other);

    Constructs an any from another any.

    Parameters:

    other

    The reference to copy.

    Throws:

    Nothing.
  5. (const any< Concept, T > & other);

    Constructs an any from another any.

    Parameters:

    other

    The object to bind the reference to.

    Throws:

    Nothing.
  6. (const any< Concept, T && > & other);

    Constructs an any from another any.

    Parameters:

    other

    The object to bind the reference to.

    Throws:

    Nothing.
  7. template<typename Concept2, typename Tag2> 
      (const any< Concept2, Tag2 > & other);

    Constructs an any from another any.

    Parameters:

    other

    The object to bind the reference to.

    Requires:

    Concept must not refer to any non-deduced placeholder besides T.

    Requires:

    After substituting T for Tag2, the requirements of Concept2 must be a superset of the requirements of Concept.

    Throws:

    std::bad_alloc
  8. template<typename Concept2, typename Tag2, typename Map> 
      (const any< Concept2, Tag2 > & other, 
          const static_binding< Map > & binding);

    Constructs an any from another any.

    Parameters:

    binding

    Specifies the mapping between the two concepts.

    other

    The object to bind the reference to.

    Requires:

    Map must be an MPL map with keys for all the non-deduced placeholders used by Concept and values for the corresponding placeholders in Concept2.

    Requires:

    After substituting placeholders according to Map, the requirements of Concept2 must be a superset of the requirements of Concept.

    Throws:

    std::bad_alloc
  9. template<typename Concept2, typename Tag2> 
      (const any< Concept2, Tag2 > & other, const binding< Concept > & binding);

    Constructs an any from another any.

    Parameters:

    binding

    Specifies the bindings of placeholders to actual types.

    other

    The object to bind the reference to.

    Requires:

    The type stored in other must match the type expected by binding.

    Postconditions:

    binding_of(*this) == binding

    Throws:

    Nothing.
  10. any & (const any & other);

    Assigns to an any.

    Requires:

    relaxed is in Concept.

    Throws:

    Nothing.
  11. template<typename U> any & (const U & other);

    Assigns to an any.

    Requires:

    relaxed is in Concept.

    Throws:

    std::bad_alloc. Provides the strong exception guarantee.

PrevUpHomeNext