File indexing completed on 2025-01-18 09:31:09
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_FUSION_COUNT_IF_09162005_0137)
0009 #define BOOST_FUSION_COUNT_IF_09162005_0137
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/algorithm/query/detail/count_if.hpp>
0013 #include <boost/fusion/support/category_of.hpp>
0014 #include <boost/fusion/support/is_sequence.hpp>
0015 #include <boost/utility/enable_if.hpp>
0016
0017 namespace boost { namespace fusion
0018 {
0019 namespace result_of
0020 {
0021 template <typename Sequence, typename F>
0022 struct count_if
0023 {
0024 typedef int type;
0025 };
0026 }
0027
0028 template <typename Sequence, typename F>
0029 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0030 inline typename
0031 enable_if<
0032 traits::is_sequence<Sequence>
0033 , int
0034 >::type
0035 count_if(Sequence const& seq, F f)
0036 {
0037 return detail::count_if(
0038 seq, f, typename traits::category_of<Sequence>::type());
0039 }
0040 }}
0041
0042 #endif
0043