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_PUSH_FRONT_HPP_INCLUDED
0011 #define BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_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_front( 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.begin(), boost::begin(from), boost::end(from) );
0034 return on;
0035 }
0036
0037 }
0038 using range::push_front;
0039 }
0040
0041 #endif