always_true_predicate.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_ALWAYS_TRUE_PREDICATE_HPP
  6. #define BOOST_PARAMETER_AUX_ALWAYS_TRUE_PREDICATE_HPP
  7. #include <boost/parameter/config.hpp>
  8. #include <boost/mpl/bool.hpp>
  9. #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
  10. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  11. #include <boost/mp11/integral.hpp>
  12. #endif
  13. #else
  14. #include <boost/mpl/always.hpp>
  15. #endif
  16. namespace boost { namespace parameter { namespace aux {
  17. #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
  18. struct always_true_predicate
  19. {
  20. template <typename ...>
  21. struct apply
  22. {
  23. typedef ::boost::mpl::true_ type;
  24. };
  25. #if defined(BOOST_PARAMETER_CAN_USE_MP11)
  26. template <typename ...>
  27. using fn = ::boost::mp11::mp_true;
  28. #endif
  29. };
  30. #else
  31. typedef ::boost::mpl::always< ::boost::mpl::true_> always_true_predicate;
  32. #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
  33. }}} // namespace boost::parameter::aux
  34. #endif // include guard