Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::type_erasure::concept_interface< Concept, Base, ID, Enable > Struct Template Reference

The concept_interface class can be specialized to add behavior to an any. More...

#include <concept_interface.hpp>

Inheritance diagram for boost::type_erasure::concept_interface< Concept, Base, ID, Enable >:
Collaboration diagram for boost::type_erasure::concept_interface< Concept, Base, ID, Enable >:

Detailed Description

template<class Concept, class Base, class ID, class Enable = void>
struct boost::type_erasure::concept_interface< Concept, Base, ID, Enable >

The concept_interface class can be specialized to add behavior to an any.

An any inherits from all the relevant specializations of concept_interface.

concept_interface can be specialized for either primitive or composite concepts. If a concept C1 contains another concept C2, then the library guarantees that the specialization of concept_interface for C2 is a base class of the specialization for C1. This means that C1 can safely override members of C2.

concept_interface may only be specialized for user-defined concepts. The library owns the specializations of its own built in concepts.

Template Parameters
ConceptThe concept that we're specializing concept_interface for. One of its placeholders should be ID.
BaseThe base of this class. Specializations of concept_interface must inherit publicly from this type.
IDThe placeholder representing this type.
EnableA dummy parameter that can be used for SFINAE.

The metafunctions derived, rebind_any, and as_param (which can be applied to Base) are useful for determining the argument and return types of functions defined in concept_interface.

For dispatching the function use .


The documentation for this struct was generated from the following file: