Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:51:15

0001 // Boost.Range library
0002 //
0003 //  Copyright Neil Groves 2009. Use, modification and
0004 //  distribution is subject to the Boost Software License, Version
0005 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006 //  http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // For more information, see http://www.boost.org/libs/range/
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     } // namespace range
0046     using range::insert;
0047 } // namespace boost
0048 
0049 #endif // include guard