]> git.lyx.org Git - lyx.git/blob - 3rdparty/boost/boost/parameter/aux_/pack/tag_deduced.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / parameter / aux_ / pack / tag_deduced.hpp
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_TAG_DEDUCED_HPP
7 #define BOOST_PARAMETER_AUX_PACK_TAG_DEDUCED_HPP
8
9 #include <boost/parameter/aux_/set.hpp>
10 #include <boost/parameter/aux_/pack/tag_type.hpp>
11 #include <boost/parameter/config.hpp>
12
13 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
14 #include <boost/mp11/list.hpp>
15 #include <boost/mp11/utility.hpp>
16 #else
17 #include <boost/mpl/pair.hpp>
18 #include <boost/mpl/apply_wrap.hpp>
19 #endif
20
21 namespace boost { namespace parameter { namespace aux {
22
23     // Tags a deduced argument Arg with the keyword tag of Spec using TagFn.
24     // Returns the tagged argument and the mpl::set<> UsedArgs with the
25     // tag of Spec inserted.
26     template <typename UsedArgs, typename Spec, typename Arg, typename TagFn>
27     struct tag_deduced
28     {
29 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
30         using type = ::boost::mp11::mp_list<
31             ::boost::mp11::mp_apply_q<
32                 TagFn
33               , ::boost::mp11::mp_list<
34                     typename ::boost::parameter::aux::tag_type<Spec>::type
35                   , Arg
36                 >
37             >
38 #else
39         typedef ::boost::mpl::pair<
40             typename ::boost::mpl::apply_wrap2<
41                 TagFn
42               , typename ::boost::parameter::aux::tag_type<Spec>::type
43               , Arg
44             >::type
45 #endif  // BOOST_PARAMETER_CAN_USE_MP11
46           , typename ::boost::parameter::aux::insert_<
47                 UsedArgs
48               , typename ::boost::parameter::aux::tag_type<Spec>::type
49             >::type
50 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
51         >;
52 #else
53         > type;
54 #endif
55     };
56 }}} // namespace boost::parameter::aux
57
58 #endif  // include guard
59