forked from boostorg/fusion
loop unrolling count(_if)
[SVN r37875]
This commit is contained in:
@ -1,16 +1,15 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
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_IF_09162005_0137)
|
||||
#define FUSION_COUNT_IF_09162005_0137
|
||||
#if !defined(BOOST_FUSION_COUNT_IF_09162005_0137)
|
||||
#define BOOST_FUSION_COUNT_IF_09162005_0137
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/algorithm/query/detail/count_if.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -28,12 +27,7 @@ namespace boost { namespace fusion
|
||||
count_if(Sequence const& seq, F f)
|
||||
{
|
||||
return detail::count_if(
|
||||
fusion::begin(seq)
|
||||
, fusion::end(seq)
|
||||
, f
|
||||
, result_of::equal_to<
|
||||
typename result_of::begin<Sequence>::type
|
||||
, typename result_of::end<Sequence>::type>());
|
||||
seq, f, typename traits::category_of<Sequence>::type());
|
||||
}
|
||||
}}
|
||||
|
||||
|
Reference in New Issue
Block a user