Ticket #6726: insert.hpp.patch

File insert.hpp.patch, 758 bytes (added by Adam D. Walling <adam.walling@…>, 11 years ago)

patch of modified insert.hpp

  • insert.hpp

     
    3535    return on;
    3636}
    3737
     38// for associative containers
     39template< class Container, class Range >
     40inline Container& insert( Container& on,
     41                          const Range& from )
     42{
     43    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
     44    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
     45    BOOST_ASSERT( (void*)&on != (void*)&from &&
     46                  "cannot copy from a container to itself" );
     47    on.insert( boost::begin(from), boost::end(from) );
     48    return on;
     49}
     50
    3851    } // namespace range
    3952    using range::insert;
    4053} // namespace boost