all.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2007 Dan Marsden
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(BOOST_FUSION_ALL_05052005_1238)
  8. #define BOOST_FUSION_ALL_05052005_1238
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/support/category_of.hpp>
  11. #include <boost/fusion/algorithm/query/detail/all.hpp>
  12. namespace boost { namespace fusion
  13. {
  14. namespace result_of
  15. {
  16. template <typename Sequence, typename F>
  17. struct all
  18. {
  19. typedef bool type;
  20. };
  21. }
  22. template <typename Sequence, typename F>
  23. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  24. inline bool
  25. all(Sequence const& seq, F f)
  26. {
  27. return detail::all(seq, f, typename traits::category_of<Sequence>::type());
  28. }
  29. }}
  30. #endif