is_named_argument.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef BOOST_PARAMETER_AUX_PACK_IS_NAMED_ARGUMENT_HPP
  6. #define BOOST_PARAMETER_AUX_PACK_IS_NAMED_ARGUMENT_HPP
  7. #include <boost/parameter/aux_/template_keyword.hpp>
  8. #include <boost/parameter/aux_/is_tagged_argument.hpp>
  9. #include <boost/parameter/config.hpp>
  10. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  11. #include <boost/mp11/integral.hpp>
  12. #include <boost/mp11/utility.hpp>
  13. #else
  14. #include <boost/mpl/bool.hpp>
  15. #include <boost/mpl/if.hpp>
  16. #endif
  17. namespace boost { namespace parameter { namespace aux {
  18. template <typename T>
  19. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  20. using is_named_argument = ::boost::mp11::mp_if<
  21. ::boost::parameter::aux::is_template_keyword<T>
  22. , ::boost::mp11::mp_true
  23. , ::boost::parameter::aux::is_tagged_argument_mp11<T>
  24. >;
  25. #else
  26. struct is_named_argument
  27. : ::boost::mpl::if_<
  28. ::boost::parameter::aux::is_template_keyword<T>
  29. , ::boost::mpl::true_
  30. , ::boost::parameter::aux::is_tagged_argument<T>
  31. >::type
  32. {
  33. };
  34. #endif
  35. }}} // namespace boost::parameter::aux
  36. #endif // include guard