source: vendor/nemo/current/NEMOGCM/EXTERNAL/XIOS/extern/boost/include/boost/range/algorithm_ext/push_back.hpp @ 44

Last change on this file since 44 was 44, checked in by cholod, 12 years ago

Load NEMO_TMP into vendor/nemo/current.

File size: 1.2 KB
Line 
1// Boost.Range library
2//
3//  Copyright Neil Groves 2009. Use, modification and
4//  distribution is subject to the Boost Software License, Version
5//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
6//  http://www.boost.org/LICENSE_1_0.txt)
7//
8// For more information, see http://www.boost.org/libs/range/
9//
10#ifndef BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
11#define BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
12
13#include <boost/range/config.hpp>
14#include <boost/range/concepts.hpp>
15#include <boost/range/difference_type.hpp>
16#include <boost/range/begin.hpp>
17#include <boost/range/end.hpp>
18#include <boost/assert.hpp>
19
20namespace boost
21{
22    namespace range
23    {
24
25template< class Container, class Range >
26inline Container& push_back( Container& on, const Range& from )
27{
28    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> ));
29    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> ));
30    BOOST_ASSERT( (void*)&on != (void*)&from &&
31                  "cannot copy from a container to itself" );
32    on.insert( on.end(), boost::begin(from), boost::end(from) );
33    return on;
34}
35
36    } // namespace range
37    using range::push_back;
38} // namespace boost
39
40#endif // include guard
Note: See TracBrowser for help on using the repository browser.