[boost][range] - Improved handling of temporary ranges in range algorithms.

[SVN r63902]
This commit is contained in:
Neil Groves
2010-07-12 00:08:41 +00:00
parent db345d4e8e
commit ef000176d8
36 changed files with 649 additions and 27 deletions

View File

@ -34,6 +34,16 @@ inline ForwardRange& rotate(ForwardRange& rng,
return rng;
}
/// \overload
template<class ForwardRange>
inline const ForwardRange& rotate(const ForwardRange& rng,
BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
std::rotate(boost::begin(rng), middle, boost::end(rng));
return rng;
}
} // namespace range
using range::rotate;
} // namespace boost