]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_erasure/include/boost/type_erasure/concept_of.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / type_erasure / include / boost / type_erasure / concept_of.hpp
1 // Boost.TypeErasure library
2 //
3 // Copyright 2011 Steven Watanabe
4 //
5 // Distributed under the Boost Software License Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //
9 // $Id$
10
11 #ifndef BOOST_TYPE_ERASURE_CONCEPT_OF_HPP_INCLUDED
12 #define BOOST_TYPE_ERASURE_CONCEPT_OF_HPP_INCLUDED
13
14 namespace boost {
15 namespace type_erasure {
16
17 template<class Concept, class T>
18 class any;
19
20 template<class Concept, class T>
21 class param;
22
23 /**
24 * A metafunction returning the concept corresponding
25 * to an @ref any. It will also work for all bases
26 * of @ref any, so it can be applied to the @c Base
27 * parameter of @ref concept_interface.
28 */
29 template<class T>
30 struct concept_of
31 {
32 #ifdef BOOST_TYPE_ERASURE_DOXYGEN
33 typedef detail::unspecified type;
34 #else
35 typedef typename ::boost::type_erasure::concept_of<
36 typename T::_boost_type_erasure_derived_type
37 >::type type;
38 #endif
39 };
40
41 /** INTERNAL ONLY */
42 template<class Concept, class T>
43 struct concept_of< ::boost::type_erasure::any<Concept, T> >
44 {
45 typedef Concept type;
46 };
47
48 /** INTERNAL ONLY */
49 template<class Concept, class T>
50 struct concept_of< ::boost::type_erasure::param<Concept, T> >
51 {
52 typedef Concept type;
53 };
54
55 }
56 }
57
58 #endif