forked from boostorg/range
Boost.Range brought back some of the const overloads that were over-zealously removed.
[SVN r61495]
This commit is contained in:
@ -28,6 +28,15 @@ namespace boost
|
||||
/// \pre SinglePassRange is a model of the SinglePassRangeConcept
|
||||
/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
|
||||
template< class SinglePassRange, class UnaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME boost::range_difference<SinglePassRange>::type
|
||||
count_if(SinglePassRange& rng, UnaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
|
||||
return std::count_if(boost::begin(rng), boost::end(rng), pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< class SinglePassRange, class UnaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME boost::range_difference<const SinglePassRange>::type
|
||||
count_if(const SinglePassRange& rng, UnaryPredicate pred)
|
||||
{
|
||||
|
Reference in New Issue
Block a user