Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.

Struct template is_subconcept



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

template<typename Sub, typename Super, typename PlaceholderMap = void> 
struct is_subconcept {


is_subconcept is a boolean metafunction that determines whether one concept is a sub-concept of another.

is_subconcept<incrementable<>, incrementable<> >             -> true
is_subconcept<incrementable<>, addable<> >                   -> false
is_subconcept<incrementable<_a>, forward_iterator<_iter>,
  mpl::map<mpl::pair<_a, _iter> > >                          -> true

Template Parameters

  1. typename Sub

    The sub concept

  2. typename Super

    The super concept

  3. typename PlaceholderMap = void

    (optional) An MPL map with keys for every non-deduced placeholder in Sub. The associated value of each key is the corresponding placeholder in Super. If PlaceholderMap is omitted, Super and Sub are presumed to use the same set of placeholders.