find_if_fwd.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*=============================================================================
  2. Copyright (c) 2011 Eric Niebler
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_FIND_IF_FWD_HPP_INCLUDED)
  7. #define BOOST_FUSION_FIND_IF_FWD_HPP_INCLUDED
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/utility/enable_if.hpp>
  10. #include <boost/type_traits/is_const.hpp>
  11. // Forward declaration of find_if algorithm
  12. namespace boost { namespace fusion
  13. {
  14. namespace result_of
  15. {
  16. template <typename Sequence, typename Pred>
  17. struct find_if;
  18. }
  19. template <typename Pred, typename Sequence>
  20. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  21. inline typename
  22. lazy_disable_if<
  23. is_const<Sequence>
  24. , result_of::find_if<Sequence, Pred>
  25. >::type
  26. find_if(Sequence& seq);
  27. template <typename Pred, typename Sequence>
  28. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  29. inline typename result_of::find_if<Sequence const, Pred>::type const
  30. find_if(Sequence const& seq);
  31. }}
  32. #endif