]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/parameter/include/boost/parameter/aux_/parenthesized_type.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / parameter / include / boost / parameter / aux_ / parenthesized_type.hpp
CommitLineData
7c673cae
FG
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
10namespace 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
18template <class UnaryFunctionPointer>
19struct unaryfunptr_arg_type;
20
21template <class Arg>
22struct unaryfunptr_arg_type<void(*)(Arg)>
23{
24 typedef Arg type;
25};
26
27template <>
28struct 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