Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:59:18

0001 // Copyright David Abrahams 2005.
0002 // Distributed under the Boost Software License, Version 1.0.
0003 // (See accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
0007 #define BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
0008 
0009 #include <boost/parameter/aux_/use_default_tag.hpp>
0010 #include <boost/parameter/config.hpp>
0011 #include <boost/utility/result_of.hpp>
0012 
0013 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0014 #include <boost/mp11/utility.hpp>
0015 #include <type_traits>
0016 #else
0017 #include <boost/mpl/if.hpp>
0018 #include <boost/type_traits/is_void.hpp>
0019 #endif
0020 
0021 namespace boost { namespace parameter { namespace aux {
0022 
0023     // A metafunction returning the result of invoking
0024     // a nullary function object of the given type.
0025     template <typename F>
0026     class result_of0
0027     {
0028 #if defined(BOOST_NO_RESULT_OF)
0029         typedef typename F::result_type result_of_F;
0030 #else
0031         typedef typename ::boost::result_of<F()>::type result_of_F;
0032 #endif
0033 
0034      public:
0035 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0036         using type = ::boost::mp11::mp_if<
0037             ::std::is_void<result_of_F>
0038 #else
0039         typedef typename ::boost::mpl::if_<
0040             ::boost::is_void<result_of_F>
0041 #endif
0042           , ::boost::parameter::aux::use_default_tag
0043           , result_of_F
0044 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
0045         >;
0046 #else
0047         >::type type;
0048 #endif
0049     };
0050 }}} // namespace boost::parameter::aux
0051 
0052 #endif  // include guard
0053