[Range] Weak concept assertions.

3 May
2012
3 May
'12
3:21 p.m.
Here's a snippet from boost/range/algorithm_ext/push_back.hpp... namespace boost { namespace range { template< class Container, class Range > inline Container& push_back( Container& on, const Range& from ) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> )); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> )); BOOST_ASSERT( (void*)&on != (void*)&from && "cannot copy from a container to itself" ); on.insert( on.end(), boost::begin(from), boost::end(from) ); return on; } } // namespace range using range::push_back; } // namespace boost Shouldn't the first concept assert be asserting that 'Container' is in fact a container, not a range? Thx - Rob.
4678
Age (days ago)
4678
Last active (days ago)
0 comments
1 participants
participants (1)
-
Robert Jones