2 // (C) Copyright Tobias Schwinger
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).
7 //------------------------------------------------------------------------------
9 #ifndef BOOST_FT_RESULT_TYPE_HPP_INCLUDED
10 #define BOOST_FT_RESULT_TYPE_HPP_INCLUDED
12 #include <boost/blank.hpp>
13 #include <boost/mpl/if.hpp>
15 #include <boost/mpl/aux_/lambda_support.hpp>
17 #include <boost/mpl/at.hpp>
19 #include <boost/function_types/is_callable_builtin.hpp>
20 #include <boost/function_types/components.hpp>
24 namespace function_types
26 template< typename T > struct result_type;
30 template<typename T> struct result_type_impl
32 < typename function_types::components<T>::types, 0 >
36 template<typename T> struct result_type
38 < function_types::is_callable_builtin<T>
39 , detail::result_type_impl<T>, boost::blank
42 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,result_type,(T))