1 // Copyright David Abrahams 2006.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_PARENTHESIZED_TYPE_HPP
7 #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_PARENTHESIZED_TYPE_HPP
9 namespace boost { namespace parameter { namespace aux {
11 // A metafunction that transforms void(*)(T) -> T
12 template <typename UnaryFunctionPointer>
13 struct unaryfunptr_arg_type;
15 template <typename Arg>
16 struct unaryfunptr_arg_type<void(*)(Arg)>
22 struct unaryfunptr_arg_type<void(*)(void)>
26 }}} // namespace boost::parameter::aux
28 // A macro that takes a parenthesized C++ type name (T) and transforms it
29 // into an un-parenthesized type expression equivalent to T.
30 #define BOOST_PARAMETER_PARENTHESIZED_TYPE(x) \
31 ::boost::parameter::aux::unaryfunptr_arg_type< void(*)x >::type
33 #endif // include guard