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_PUSH_BACK_HPP_INCLUDED
0011 #define BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_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/range/detail/implementation_help.hpp>
0019 #include <boost/assert.hpp>
0020 
0021 namespace boost
0022 {
0023     namespace range
0024     {
0025 
0026 template< class Container, class Range >
0027 inline Container& push_back( Container& on, const Range& from )
0028 {
0029     BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> ));
0030     BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> ));
0031     BOOST_ASSERT_MSG(!range_detail::is_same_object(on, from),
0032         "cannot copy from a container to itself");
0033     on.insert( on.end(), boost::begin(from), boost::end(from) );
0034     return on;
0035 }
0036 
0037     } // namespace range
0038     using range::push_back;
0039 } // namespace boost
0040 
0041 #endif // include guard