]> git.lyx.org Git - lyx.git/blob - 3rdparty/boost/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / parameter / aux_ / pack / tag_keyword_arg_ref.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_KEYWORD_ARG_REF_HPP
7 #define BOOST_PARAMETER_AUX_PACK_TAG_KEYWORD_ARG_REF_HPP
8
9 #include <boost/parameter/aux_/unwrap_cv_reference.hpp>
10 #include <boost/parameter/aux_/tagged_argument.hpp>
11 #include <boost/parameter/config.hpp>
12
13 namespace boost { namespace parameter { namespace aux { 
14
15     template <
16         typename Keyword
17       , typename ActualArg
18 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
19       , typename = typename ::boost::parameter::aux
20         ::is_cv_reference_wrapper<ActualArg>::type
21 #endif
22     >
23     struct tag_ref
24     {
25         typedef ::boost::parameter::aux::tagged_argument<
26             Keyword
27           , typename ::boost::parameter::aux
28             ::unwrap_cv_reference<ActualArg>::type
29         > type;
30     };
31 }}} // namespace boost::parameter::aux_
32
33 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
34
35 #include <boost/mpl/bool.hpp>
36
37 namespace boost { namespace parameter { namespace aux { 
38
39     template <typename Keyword, typename ActualArg>
40     struct tag_ref<Keyword,ActualArg,::boost::mpl::false_>
41     {
42         typedef ::boost::parameter::aux
43         ::tagged_argument<Keyword,ActualArg> type;
44     };
45 }}} // namespace boost::parameter::aux_
46
47 #endif  // Borland workarounds needed.
48
49 namespace boost { namespace parameter { namespace aux {
50
51     struct tag_keyword_arg_ref
52     {
53         template <typename K, typename T>
54         struct apply
55         {
56             typedef typename ::boost::parameter::aux::tag_ref<K,T>::type type;
57         };
58
59 #if defined(BOOST_PARAMETER_CAN_USE_MP11)
60         template <typename K, typename T>
61         using fn = typename ::boost::parameter::aux::tag_ref<K,T>::type;
62 #endif
63     };
64 }}} // namespace boost::parameter::aux
65
66 #endif  // include guard
67