any.hpp 1.1 KB

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