]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/function_types/include/boost/function_types/detail/pp_tags/master.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / function_types / include / boost / function_types / detail / pp_tags / master.hpp
1
2 // (C) Copyright Tobias Schwinger
3 //
4 // Use modification and distribution are subject to the boost Software License,
5 // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
6
7 //------------------------------------------------------------------------------
8
9 // no include guards, this file is guarded externally
10
11 #ifdef __WAVE__
12 // this file has been generated from the master.hpp file in the same directory
13 # pragma wave option(preserve: 0)
14 #endif
15
16 #if !defined(BOOST_FT_PREPROCESSING_MODE) || defined(BOOST_FT_CONFIG_HPP_INCLUDED)
17 # error "this file used with two-pass preprocessing, only"
18 #endif
19
20 #include <boost/preprocessor/slot/slot.hpp>
21 #include <boost/function_types/detail/encoding/def.hpp>
22
23 namespace boost { namespace function_types {
24
25 typedef detail::property_tag<BOOST_FT_non_variadic,BOOST_FT_variadic_mask> non_variadic;
26 typedef detail::property_tag<BOOST_FT_variadic,BOOST_FT_variadic_mask> variadic;
27
28 typedef detail::property_tag<0,BOOST_FT_const> non_const;
29 typedef detail::property_tag<BOOST_FT_const,BOOST_FT_const> const_qualified;
30
31 typedef detail::property_tag<0,BOOST_FT_volatile> non_volatile;
32 typedef detail::property_tag<BOOST_FT_volatile,BOOST_FT_volatile> volatile_qualified;
33
34 typedef detail::property_tag<BOOST_FT_default_cc,BOOST_FT_cc_mask> default_cc;
35
36 #define BOOST_PP_VALUE BOOST_FT_const|BOOST_FT_volatile
37 #include BOOST_PP_ASSIGN_SLOT(1)
38
39 typedef detail::property_tag<0 , BOOST_PP_SLOT(1)> non_cv;
40 typedef detail::property_tag<BOOST_FT_const , BOOST_PP_SLOT(1)> const_non_volatile;
41 typedef detail::property_tag<BOOST_FT_volatile, BOOST_PP_SLOT(1)> volatile_non_const;
42 typedef detail::property_tag<BOOST_PP_SLOT(1) , BOOST_PP_SLOT(1)> cv_qualified;
43
44 namespace detail {
45
46 typedef constant<BOOST_FT_full_mask> full_mask;
47
48 template <bits_t Flags, bits_t CCID> struct encode_bits_impl
49 {
50 BOOST_STATIC_CONSTANT( bits_t, value =
51 Flags | (BOOST_FT_default_cc * CCID) << 1 );
52 };
53
54 template <bits_t Flags, bits_t CCID, std::size_t Arity>
55 struct encode_charr_impl
56 {
57 BOOST_STATIC_CONSTANT(std::size_t, value = (std::size_t)(1+
58 Flags | (BOOST_FT_default_cc * CCID) << 1 | Arity << BOOST_FT_arity_shift
59 ));
60 };
61
62 template <bits_t Bits> struct decode_bits
63 {
64 BOOST_STATIC_CONSTANT(bits_t, flags = Bits & BOOST_FT_flags_mask);
65
66 BOOST_STATIC_CONSTANT(bits_t, cc_id =
67 ( (Bits & BOOST_FT_full_mask) / BOOST_FT_default_cc) >> 1
68 );
69
70 BOOST_STATIC_CONSTANT(bits_t, tag_bits = (Bits & BOOST_FT_full_mask));
71
72 BOOST_STATIC_CONSTANT(std::size_t, arity = (std::size_t)
73 (Bits >> BOOST_FT_arity_shift)
74 );
75 };
76
77 template <bits_t LHS_bits, bits_t LHS_mask, bits_t RHS_bits, bits_t RHS_mask>
78 struct tag_ice
79 {
80 BOOST_STATIC_CONSTANT(bool, match =
81 RHS_bits == (LHS_bits & RHS_mask & (RHS_bits |~BOOST_FT_type_mask))
82 );
83
84 BOOST_STATIC_CONSTANT(bits_t, combined_bits =
85 (LHS_bits & ~RHS_mask) | RHS_bits
86 );
87
88 BOOST_STATIC_CONSTANT(bits_t, combined_mask =
89 LHS_mask | RHS_mask
90 );
91
92 BOOST_STATIC_CONSTANT(bits_t, extracted_bits =
93 LHS_bits & RHS_mask
94 );
95
96 };
97
98 #define BOOST_FT_mask BOOST_FT_type_mask
99 typedef property_tag<BOOST_FT_callable_builtin,BOOST_FT_mask> callable_builtin_tag;
100 typedef property_tag<BOOST_FT_non_member_callable_builtin,BOOST_FT_mask> nonmember_callable_builtin_tag;
101 typedef property_tag<BOOST_FT_function,BOOST_FT_mask> function_tag;
102 typedef property_tag<BOOST_FT_reference,BOOST_FT_mask> reference_tag;
103 typedef property_tag<BOOST_FT_pointer,BOOST_FT_mask> pointer_tag;
104 typedef property_tag<BOOST_FT_member_function_pointer,BOOST_FT_mask> member_function_pointer_tag;
105 typedef property_tag<BOOST_FT_member_object_pointer,BOOST_FT_mask> member_object_pointer_tag;
106 typedef property_tag<BOOST_FT_member_object_pointer_flags,BOOST_FT_full_mask> member_object_pointer_base;
107 typedef property_tag<BOOST_FT_member_pointer,BOOST_FT_mask> member_pointer_tag;
108 #undef BOOST_FT_mask
109
110 #define BOOST_PP_VALUE BOOST_FT_function|BOOST_FT_non_variadic|BOOST_FT_default_cc
111 #include BOOST_PP_ASSIGN_SLOT(1)
112 #define BOOST_PP_VALUE BOOST_FT_type_mask|BOOST_FT_variadic_mask|BOOST_FT_cc_mask
113 #include BOOST_PP_ASSIGN_SLOT(2)
114
115 typedef property_tag< BOOST_PP_SLOT(1) , BOOST_PP_SLOT(2) > nv_dcc_func;
116
117 #define BOOST_PP_VALUE \
118 BOOST_FT_member_function_pointer|BOOST_FT_non_variadic|BOOST_FT_default_cc
119 #include BOOST_PP_ASSIGN_SLOT(1)
120
121 typedef property_tag< BOOST_PP_SLOT(1) , BOOST_PP_SLOT(2) > nv_dcc_mfp;
122
123 } // namespace detail
124
125 } } // namespace ::boost::function_types
126