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> ();
  template<typename U, typename Map> 
    (, static_binding< );
  (any &);
  (any< );
  (any< );
  (any< );
  template<typename Concept2, typename Tag2> 
    (any< );
  template<typename Concept2, typename Tag2, typename Map> 
    (any< , static_binding< );
  template<typename Concept2, typename Tag2> 
    (any< , binding< );
  any & (any &);
  template<typename U> any & ();
};

Description

any public construct/copy/destruct

  1. template<typename 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> 
      ( arg, static_binding<  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. (any & other);

    Constructs an any from another any.

    Parameters:

    other

    The reference to copy.

    Throws:

    Nothing.
  4. (any<  other);

    Constructs an any from another any.

    Parameters:

    other

    The reference to copy.

    Throws:

    Nothing.
  5. (any<  other);

    Constructs an any from another any.

    Parameters:

    other

    The object to bind the reference to.

    Throws:

    Nothing.
  6. (any<  other);

    Constructs an any from another any.

    Parameters:

    other

    The object to bind the reference to.

    Throws:

    Nothing.
  7. template<typename Concept2, typename Tag2> 
      (any<  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> 
      (any<  other, 
          static_binding<  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> 
      (any<  other, binding<  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 & (any & other);

    Assigns to an any.

    Requires:

    relaxed is in Concept.

    Throws:

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

    Assigns to an any.

    Requires:

    relaxed is in Concept.

    Throws:

    std::bad_alloc. Provides the strong exception guarantee.

PrevUpHomeNext