or_c.hpp 755 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_METAPARSE_V1_CPP11_OR_C_HPP
  2. #define BOOST_METAPARSE_V1_CPP11_OR_C_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <boost/mpl/bool.hpp>
  8. namespace boost
  9. {
  10. namespace metaparse
  11. {
  12. namespace v1
  13. {
  14. namespace impl
  15. {
  16. template <bool... Bs>
  17. struct or_c;
  18. template <>
  19. struct or_c<> : boost::mpl::false_ {};
  20. template <bool... Bs>
  21. struct or_c<true, Bs...> : boost::mpl::true_ {};
  22. template <bool... Bs>
  23. struct or_c<false, Bs...> : or_c<Bs...> {};
  24. }
  25. }
  26. }
  27. }
  28. #endif