| 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_ITEMS_HPP |
| 7 | #define BOOST_PARAMETER_AUX_PACK_MAKE_ITEMS_HPP |
| 8 | |
| 9 | #include <boost/parameter/aux_/void.hpp> |
| 10 | #include <boost/parameter/aux_/pack/item.hpp> |
| 11 | #include <boost/parameter/config.hpp> |
| 12 | |
| 13 | #if defined(BOOST_PARAMETER_CAN_USE_MP11) |
| 14 | #include <boost/mp11/utility.hpp> |
| 15 | #include <type_traits> |
| 16 | #else |
| 17 | #include <boost/mpl/eval_if.hpp> |
| 18 | #include <boost/mpl/identity.hpp> |
| 19 | #include <boost/type_traits/is_same.hpp> |
| 20 | #endif |
| 21 | |
| 22 | namespace boost { namespace parameter { namespace aux { |
| 23 | |
| 24 | // Creates a item typelist. |
| 25 | template <typename Spec, typename Arg, typename Tail> |
| 26 | #if defined(BOOST_PARAMETER_CAN_USE_MP11) |
| 27 | using make_items = ::boost::mp11::mp_if< |
| 28 | ::std::is_same<Arg,::boost::parameter::void_> |
| 29 | , ::boost::mp11::mp_identity< ::boost::parameter::void_> |
| 30 | , ::boost::parameter::aux::make_item<Spec,Arg,Tail> |
| 31 | >; |
| 32 | #else |
| 33 | struct make_items |
| 34 | : ::boost::mpl::eval_if< |
| 35 | ::boost::is_same<Arg,::boost::parameter::void_> |
| 36 | , ::boost::mpl::identity< ::boost::parameter::void_> |
| 37 | , ::boost::parameter::aux::make_item<Spec,Arg,Tail> |
| 38 | > |
| 39 | { |
| 40 | }; |
| 41 | #endif |
| 42 | }}} // namespace boost::parameter::aux |
| 43 | |
| 44 | #endif // include guard |
| 45 | |
| 46 | |