fix doc example typo
[boost.git] / boost / fusion / algorithm / query / count.hpp
blob27e3370e806d0def49fd5a4999e0524df2126bed
1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
3 Copyright (c) 2007
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(BOOST_FUSION_COUNT_09162005_0150)
9 #define BOOST_FUSION_COUNT_09162005_0150
11 #include <boost/fusion/algorithm/query/count_if.hpp>
12 #include <boost/fusion/algorithm/query/detail/count.hpp>
14 namespace boost { namespace fusion
16 namespace result_of
18 template <typename Sequence, typename F>
19 struct count
21 typedef int type;
25 template <typename Sequence, typename T>
26 inline int
27 count(Sequence const& seq, T const& x)
29 detail::count_compare<T> f(x);
30 return fusion::count_if(seq, f);
34 #endif