|
|
|||
File indexing completed on 2025-12-16 10:10:13
0001 // Boost.TypeErasure library 0002 // 0003 // Copyright 2011 Steven Watanabe 0004 // 0005 // Distributed under the Boost Software License Version 1.0. (See 0006 // accompanying file LICENSE_1_0.txt or copy at 0007 // http://www.boost.org/LICENSE_1_0.txt) 0008 // 0009 // $Id$ 0010 0011 #ifndef BOOST_TYPE_ERASURE_CONCEPT_INTERFACE_HPP_INCLUDED 0012 #define BOOST_TYPE_ERASURE_CONCEPT_INTERFACE_HPP_INCLUDED 0013 0014 namespace boost { 0015 namespace type_erasure { 0016 0017 /** 0018 * The @ref concept_interface class can be specialized to 0019 * add behavior to an @ref any. An @ref any inherits from 0020 * all the relevant specializations of @ref concept_interface. 0021 * 0022 * @ref concept_interface can be specialized for either 0023 * primitive or composite concepts. If a concept @c C1 0024 * contains another concept @c C2, then the library guarantees 0025 * that the specialization of @ref concept_interface for 0026 * @c C2 is a base class of the specialization for @c C1. 0027 * This means that @c C1 can safely override members of @c C2. 0028 * 0029 * @ref concept_interface may only be specialized for user-defined 0030 * concepts. The library owns the specializations of its own 0031 * built in concepts. 0032 * 0033 * \tparam Concept The concept that we're specializing 0034 * @ref concept_interface for. One of its 0035 * placeholders should be @c ID. 0036 * \tparam Base The base of this class. Specializations of @ref 0037 * concept_interface must inherit publicly from this type. 0038 * \tparam ID The placeholder representing this type. 0039 * \tparam Enable A dummy parameter that can be used for SFINAE. 0040 * 0041 * The metafunctions @ref derived, @ref rebind_any, and @ref as_param 0042 * (which can be applied to @c Base) are useful for determining the 0043 * argument and return types of functions defined in @ref concept_interface. 0044 * 0045 * For dispatching the function use \call. 0046 */ 0047 template<class Concept, class Base, class ID, class Enable = void> 0048 struct concept_interface : Base {}; 0049 0050 } 0051 } 0052 0053 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|