Boost.Range updated the return types of various algorithms to improve consistency. This is to address a specific request made during the formal review of Boost.RangeEx.

[SVN r61211]
This commit is contained in:
Neil Groves
2010-04-11 22:05:02 +00:00
parent cab01e8ba3
commit 350a1f8bfc
108 changed files with 937 additions and 605 deletions

View File

@ -23,15 +23,16 @@ namespace boost
{
template< class Container, class Range >
inline void insert( Container& on,
BOOST_DEDUCED_TYPENAME Container::iterator before,
const Range& from )
inline Container& insert( Container& on,
BOOST_DEDUCED_TYPENAME Container::iterator before,
const Range& from )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
BOOST_ASSERT( (void*)&on != (void*)&from &&
"cannot copy from a container to itself" );
on.insert( before, boost::begin(from), boost::end(from) );
return on;
}
} // namespace range