forked from boostorg/range
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:
@ -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
|
||||
|
Reference in New Issue
Block a user