| 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 | #ifndef BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED |
| 10 | #define BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED |
| 11 | |
| 12 | #include <boost/blank.hpp> |
| 13 | #include <boost/mpl/if.hpp> |
| 14 | |
| 15 | #include <boost/mpl/aux_/lambda_support.hpp> |
| 16 | |
| 17 | #include <boost/mpl/pop_front.hpp> |
| 18 | |
| 19 | #include <boost/function_types/is_callable_builtin.hpp> |
| 20 | #include <boost/function_types/components.hpp> |
| 21 | |
| 22 | namespace boost |
| 23 | { |
| 24 | namespace function_types |
| 25 | { |
| 26 | using mpl::placeholders::_; |
| 27 | |
| 28 | template< typename T, typename ClassTypeTransform = add_reference<_> > |
| 29 | struct parameter_types; |
| 30 | |
| 31 | namespace detail |
| 32 | { |
| 33 | template<typename T, typename ClassTypeTransform> |
| 34 | struct parameter_types_impl |
| 35 | : mpl::pop_front |
| 36 | < typename function_types::components<T,ClassTypeTransform>::types |
| 37 | >::type |
| 38 | { }; |
| 39 | } |
| 40 | |
| 41 | template<typename T, typename ClassTypeTransform> struct parameter_types |
| 42 | : mpl::if_ |
| 43 | < function_types::is_callable_builtin<T> |
| 44 | , detail::parameter_types_impl<T,ClassTypeTransform>, boost::blank |
| 45 | >::type |
| 46 | { |
| 47 | BOOST_MPL_AUX_LAMBDA_SUPPORT(2,parameter_types,(T,ClassTypeTransform)) |
| 48 | }; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | #endif |
| 53 | |
| 54 | |