123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef BOOST_PARAMETER_TEMPLATE_KEYWORD_HPP
- #define BOOST_PARAMETER_TEMPLATE_KEYWORD_HPP
- #include <boost/parameter/aux_/template_keyword.hpp>
- #include <boost/parameter/config.hpp>
- #if defined(BOOST_PARAMETER_CAN_USE_MP11)
- #include <boost/mp11/integral.hpp>
- #include <boost/mp11/utility.hpp>
- #include <type_traits>
- #else
- #include <boost/mpl/bool.hpp>
- #include <boost/mpl/if.hpp>
- #include <boost/mpl/eval_if.hpp>
- #include <boost/mpl/identity.hpp>
- #include <boost/type_traits/add_lvalue_reference.hpp>
- #include <boost/type_traits/is_function.hpp>
- #include <boost/type_traits/is_array.hpp>
- #endif
- namespace boost { namespace parameter {
- template <typename Tag, typename T>
- struct template_keyword : ::boost::parameter::aux::template_keyword_base
- {
- typedef Tag key_type;
- typedef T value_type;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #if defined(BOOST_PARAMETER_CAN_USE_MP11)
- using reference = typename ::boost::mp11::mp_eval_if<
- ::boost::mp11::mp_if<
- ::std::is_function<value_type>
- , ::boost::mp11::mp_true
- , ::std::is_array<value_type>
- >
- , ::std::add_lvalue_reference<value_type>
- , ::boost::mp11::mp_identity
- , value_type
- >::type;
- #else
- typedef typename ::boost::mpl::eval_if<
- typename ::boost::mpl::if_<
- ::boost::is_function<value_type>
- , ::boost::mpl::true_
- , ::boost::is_array<value_type>
- >::type
- , ::boost::add_lvalue_reference<value_type>
- , ::boost::mpl::identity<value_type>
- >::type reference;
- #endif
- };
- }}
- #define BOOST_PARAMETER_TEMPLATE_KEYWORD(name) \
- namespace tag \
- { \
- struct name; \
- } \
- template <typename T> \
- struct name : ::boost::parameter::template_keyword<tag::name,T> \
- { \
- };
- #endif
|