]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/convert/detail/boost_parameter_ext.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / convert / detail / boost_parameter_ext.hpp
1 // Copyright (c) 2009-2016 Vladimir Batov.
2 // Use, modification and distribution are subject to the Boost Software License,
3 // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
4
5 #ifndef BOOST_PARAMETER_EXT_PRIVATE_HPP
6 #define BOOST_PARAMETER_EXT_PRIVATE_HPP
7
8 #include <boost/parameter/keyword.hpp>
9
10 // A Boost.Parameter extension by Andrey Semashev.
11 // This should really go to Boost.Parameter in the end.
12
13 namespace boost { namespace parameter {
14
15 // The metafunction, given the type of the arguments pack and the keyword tag,
16 // returns the corresponding parameter type
17 template< typename ArgsT, typename KeywordTagT >
18 struct parameter_type
19 {
20 typedef void type;
21 };
22
23 template< typename ArgT, typename KeywordTagT >
24 struct parameter_type<aux::tagged_argument<KeywordTagT, ArgT>, KeywordTagT>
25 {
26 typedef typename aux::tagged_argument< KeywordTagT, ArgT >::value_type type;
27 };
28
29 template< typename KeywordTagT1, typename ArgT, typename KeywordTagT2 >
30 struct parameter_type< aux::tagged_argument< KeywordTagT1, ArgT >, KeywordTagT2 >
31 {
32 typedef void type;
33 };
34
35 template< typename ArgT, typename TailT, typename KeywordTagT >
36 struct parameter_type<
37 aux::arg_list<
38 aux::tagged_argument< KeywordTagT, ArgT >,
39 TailT
40 >,
41 KeywordTagT
42 >
43 {
44 typedef typename aux::tagged_argument< KeywordTagT, ArgT >::value_type type;
45 };
46
47 template< typename KeywordTagT1, typename ArgT, typename TailT, typename KeywordTagT2 >
48 struct parameter_type<
49 aux::arg_list<
50 aux::tagged_argument< KeywordTagT1, ArgT >,
51 TailT
52 >,
53 KeywordTagT2
54 > :
55 public parameter_type< TailT, KeywordTagT2 >
56 {
57 };
58
59 }} // boost::parameter
60
61 #endif // BOOST_PARAMETER_EXT_PRIVATE_HPP
62