Index: insert.hpp =================================================================== --- insert.hpp (revision 77313) +++ insert.hpp (working copy) @@ -35,6 +35,19 @@ return on; } +// for associative containers +template< class Container, class Range > +inline Container& insert( Container& on, + const Range& from ) +{ + BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + BOOST_ASSERT( (void*)&on != (void*)&from && + "cannot copy from a container to itself" ); + on.insert( boost::begin(from), boost::end(from) ); + return on; +} + } // namespace range using range::insert; } // namespace boost