1 // Copyright David Abrahams, Daniel Wallin 2003. 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) 5 6 #ifndef BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP 7 #define BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP 8 9 #include <boost/parameter/aux_/void.hpp> 10 #include <boost/parameter/aux_/pack/deduced_item.hpp> 11 #include <boost/parameter/deduced.hpp> 12 #include <boost/parameter/config.hpp> 13 14 #if defined(BOOST_PARAMETER_CAN_USE_MP11) 15 #include <boost/mp11/utility.hpp> 16 #include <type_traits> 17 #else 18 #include <boost/mpl/eval_if.hpp> 19 #include <boost/mpl/identity.hpp> 20 #include <boost/type_traits/is_same.hpp> 21 #endif 22 23 namespace boost { namespace parameter { namespace aux { 24 25 template <typename Spec, typename Tail> 26 #if defined(BOOST_PARAMETER_CAN_USE_MP11) 27 using make_deduced_items = ::boost::mp11::mp_if< 28 ::std::is_same<Spec,::boost::parameter::void_> 29 , ::boost::mp11::mp_identity< ::boost::parameter::void_> 30 , ::boost::mp11::mp_if< 31 ::boost::parameter::aux::is_deduced<Spec> 32 , ::boost::parameter::aux::make_deduced_item<Spec,Tail> 33 , Tail 34 > 35 >; 36 #else 37 struct make_deduced_items 38 : ::boost::mpl::eval_if< 39 ::boost::is_same<Spec,::boost::parameter::void_> 40 , ::boost::mpl::identity< ::boost::parameter::void_> 41 , ::boost::mpl::eval_if< 42 ::boost::parameter::aux::is_deduced<Spec> 43 , ::boost::parameter::aux::make_deduced_item<Spec,Tail> 44 , Tail 45 > 46 > 47 { 48 }; 49 #endif // BOOST_PARAMETER_CAN_USE_MP11 50 }}} // namespace boost::parameter::aux 51 52 #endif // include guard 53 54