]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/type_erasure/placeholder_of.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / type_erasure / placeholder_of.hpp
CommitLineData
7c673cae
FG
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_PLACEHOLDER_OF_HPP_INCLUDED
12#define BOOST_TYPE_ERASURE_PLACEHOLDER_OF_HPP_INCLUDED
13
14namespace boost {
15namespace type_erasure {
16
11fdf7f2
TL
17#ifndef BOOST_TYPE_ERASURE_DOXYGEN
18
7c673cae
FG
19template<class Concept, class T>
20class any;
21
22template<class Concept, class T>
23class param;
24
11fdf7f2
TL
25#endif
26
7c673cae
FG
27/**
28 * A metafunction returning the (const/reference qualified) placeholder
29 * corresponding to an @ref any. It will also work for all bases
30 * of @ref any, so it can be applied to the @c Base
31 * parameter of @ref concept_interface.
32 */
33template<class T>
34struct placeholder_of
35{
36#ifdef BOOST_TYPE_ERASURE_DOXYGEN
37 typedef detail::unspecified type;
38#else
39 typedef typename ::boost::type_erasure::placeholder_of<
40 typename T::_boost_type_erasure_derived_type
41 >::type type;
42#endif
43};
44
45/** INTERNAL ONLY */
46template<class Concept, class T>
47struct placeholder_of< ::boost::type_erasure::any<Concept, T> >
48{
49 typedef T type;
50};
51
52/** INTERNAL ONLY */
53template<class Concept, class T>
54struct placeholder_of< ::boost::type_erasure::param<Concept, T> >
55{
56 typedef T type;
57};
58
11fdf7f2
TL
59#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
60
61template<class T>
62using placeholder_of_t = typename ::boost::type_erasure::placeholder_of<T>::type;
63
64#endif
65
7c673cae
FG
66}
67}
68
69#endif