File indexing completed on 2025-01-18 09:51:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
0011 #define BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
0012
0013 #include <boost/range/config.hpp>
0014 #include <boost/range/concepts.hpp>
0015 #include <boost/range/difference_type.hpp>
0016 #include <boost/range/begin.hpp>
0017 #include <boost/range/end.hpp>
0018 #include <boost/assert.hpp>
0019
0020 namespace boost
0021 {
0022 namespace range
0023 {
0024
0025 template< class Container, class Range >
0026 inline Container& insert( Container& on,
0027 BOOST_DEDUCED_TYPENAME Container::iterator before,
0028 const Range& from )
0029 {
0030 BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
0031 BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
0032 on.insert( before, boost::begin(from), boost::end(from) );
0033 return on;
0034 }
0035
0036 template< class Container, class Range >
0037 inline Container& insert( Container& on, const Range& from )
0038 {
0039 BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
0040 BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
0041 on.insert(boost::begin(from), boost::end(from));
0042 return on;
0043 }
0044
0045 }
0046 using range::insert;
0047 }
0048
0049 #endif