is_placeholder.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright Cromwell D. Enage 2019.
  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_IS_PLACEHOLDER_HPP
  6. #define BOOST_PARAMETER_AUX_IS_PLACEHOLDER_HPP
  7. #include <boost/parameter/config.hpp>
  8. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  9. #include <boost/mp11/integral.hpp>
  10. #else
  11. #include <boost/mpl/bool.hpp>
  12. #endif
  13. namespace boost { namespace parameter { namespace aux {
  14. template <typename T>
  15. struct is_mpl_placeholder
  16. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  17. : ::boost::mp11::mp_false
  18. #else
  19. : ::boost::mpl::false_
  20. #endif
  21. {
  22. };
  23. }}} // namespace boost::parameter::aux
  24. #include <boost/mpl/arg_fwd.hpp>
  25. namespace boost { namespace parameter { namespace aux {
  26. template <int I>
  27. struct is_mpl_placeholder< ::boost::mpl::arg<I> >
  28. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  29. : ::boost::mp11::mp_true
  30. #else
  31. : ::boost::mpl::true_
  32. #endif
  33. {
  34. };
  35. }}} // namespace boost::parameter::aux
  36. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  37. #include <boost/mp11/bind.hpp>
  38. namespace boost { namespace parameter { namespace aux {
  39. template <typename T>
  40. struct is_mp11_placeholder : ::boost::mp11::mp_false
  41. {
  42. };
  43. template < ::std::size_t I>
  44. struct is_mp11_placeholder< ::boost::mp11::mp_arg<I> >
  45. : ::boost::mp11::mp_true
  46. {
  47. };
  48. }}} // namespace boost::parameter::aux
  49. #endif // BOOST_PARAMETER_CAN_USE_MP11
  50. #endif // include guard