forked from boostorg/range
[boost][range] - Improved handling of temporary ranges in range algorithms.
[SVN r63903]
This commit is contained in:
@ -38,7 +38,10 @@ namespace boost
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
|
||||
test_iter(Container& cont)
|
||||
{
|
||||
return boost::find_if(cont, m_pred);
|
||||
typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iter_t;
|
||||
iter_t result = boost::find_if(cont, m_pred);
|
||||
BOOST_CHECK( result == boost::find_if(boost::make_iterator_range(cont), m_pred) );
|
||||
return result;
|
||||
}
|
||||
|
||||
template<range_return_value return_type>
|
||||
@ -48,7 +51,10 @@ namespace boost
|
||||
BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
|
||||
operator()(find_if_test_policy& policy, Container& cont)
|
||||
{
|
||||
return boost::find_if<return_type>(cont, policy.pred());
|
||||
typedef BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type result_t;
|
||||
result_t result = boost::find_if<return_type>(cont, policy.pred());
|
||||
BOOST_CHECK( result == boost::find_if<return_type>(boost::make_iterator_range(cont), policy.pred()) );
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user