all.hpp 982 B

12345678910111213141516171819202122232425262728293031323334
  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/category_of.hpp>
  10. #include <boost/fusion/algorithm/query/detail/all.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. namespace result_of
  14. {
  15. template <typename Sequence, typename F>
  16. struct all
  17. {
  18. typedef bool type;
  19. };
  20. }
  21. template <typename Sequence, typename F>
  22. inline bool
  23. all(Sequence const& seq, F f)
  24. {
  25. return detail::all(seq, f, typename traits::category_of<Sequence>::type());
  26. }
  27. }}
  28. #endif