summaryrefslogtreecommitdiff
path: root/boost/parameter/aux_/pack/make_deduced_items.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/parameter/aux_/pack/make_deduced_items.hpp')
-rw-r--r--boost/parameter/aux_/pack/make_deduced_items.hpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/boost/parameter/aux_/pack/make_deduced_items.hpp b/boost/parameter/aux_/pack/make_deduced_items.hpp
new file mode 100644
index 0000000000..3bc34332f0
--- /dev/null
+++ b/boost/parameter/aux_/pack/make_deduced_items.hpp
@@ -0,0 +1,53 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP
+#define BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP
+
+#include <boost/parameter/aux_/void.hpp>
+#include <boost/parameter/aux_/pack/deduced_item.hpp>
+#include <boost/parameter/deduced.hpp>
+#include <boost/parameter/config.hpp>
+
+#if defined(BOOST_PARAMETER_CAN_USE_MP11)
+#include <boost/mp11/utility.hpp>
+#include <type_traits>
+#else
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost { namespace parameter { namespace aux {
+
+ template <typename Spec, typename Tail>
+#if defined(BOOST_PARAMETER_CAN_USE_MP11)
+ using make_deduced_items = ::boost::mp11::mp_if<
+ ::std::is_same<Spec,::boost::parameter::void_>
+ , ::boost::mp11::mp_identity< ::boost::parameter::void_>
+ , ::boost::mp11::mp_if<
+ ::boost::parameter::aux::is_deduced<Spec>
+ , ::boost::parameter::aux::make_deduced_item<Spec,Tail>
+ , Tail
+ >
+ >;
+#else
+ struct make_deduced_items
+ : ::boost::mpl::eval_if<
+ ::boost::is_same<Spec,::boost::parameter::void_>
+ , ::boost::mpl::identity< ::boost::parameter::void_>
+ , ::boost::mpl::eval_if<
+ ::boost::parameter::aux::is_deduced<Spec>
+ , ::boost::parameter::aux::make_deduced_item<Spec,Tail>
+ , Tail
+ >
+ >
+ {
+ };
+#endif // BOOST_PARAMETER_CAN_USE_MP11
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+