]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/parameter/aux_/parenthesized_type.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / parameter / aux_ / parenthesized_type.hpp
1 // Copyright David Abrahams 2006. Distributed under the Boost
2 // Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4 #ifndef BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
5 # define BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
6
7 # include <boost/config.hpp>
8 # include <boost/detail/workaround.hpp>
9
10 namespace boost { namespace parameter { namespace aux {
11
12 // A macro that takes a parenthesized C++ type name (T) and transforms
13 // it into an un-parenthesized type expression equivalent to T.
14 # define BOOST_PARAMETER_PARENTHESIZED_TYPE(x) \
15 boost::parameter::aux::unaryfunptr_arg_type< void(*)x >::type
16
17 // A metafunction that transforms void(*)(T) -> T
18 template <class UnaryFunctionPointer>
19 struct unaryfunptr_arg_type;
20
21 template <class Arg>
22 struct unaryfunptr_arg_type<void(*)(Arg)>
23 {
24 typedef Arg type;
25 };
26
27 template <>
28 struct unaryfunptr_arg_type<void(*)(void)>
29 {
30 typedef void type;
31 };
32
33 }}} // namespace boost::parameter::aux
34
35 #endif // BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP