/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_COUNT_09162005_0150) #define FUSION_COUNT_09162005_0150 #include #include #include #include #include #include #include namespace boost { namespace fusion { namespace result_of { template struct count { typedef int type; }; } template inline int count(Sequence const& seq, T const& x) { detail::count_compare f(x); return detail::count_if( fusion::begin(seq) , fusion::end(seq) , f , result_of::equal_to< typename result_of::begin::type , typename result_of::end::type>()); } }} #endif