New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
fill.hpp in vendors/XIOS/current/extern/boost/include/boost/range/algorithm – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/range/algorithm/fill.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 1.3 KB
Line 
1//  Copyright Neil Groves 2009. Use, modification and
2//  distribution is subject to the Boost Software License, Version
3//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
4//  http://www.boost.org/LICENSE_1_0.txt)
5//
6//
7// For more information, see http://www.boost.org/libs/range/
8//
9#ifndef BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
10#define BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
11
12#include <boost/concept_check.hpp>
13#include <boost/range/begin.hpp>
14#include <boost/range/end.hpp>
15#include <boost/range/concepts.hpp>
16#include <algorithm>
17
18namespace boost
19{
20    namespace range
21    {
22
23/// \brief template function fill
24///
25/// range-based version of the fill std algorithm
26///
27/// \pre ForwardRange is a model of the ForwardRangeConcept
28template< class ForwardRange, class Value >
29inline ForwardRange& fill(ForwardRange& rng, const Value& val)
30{
31    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
32    std::fill(boost::begin(rng), boost::end(rng), val);
33    return rng;
34}
35
36/// \overload
37template< class ForwardRange, class Value >
38inline const ForwardRange& fill(const ForwardRange& rng, const Value& val)
39{
40    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
41    std::fill(boost::begin(rng), boost::end(rng), val);
42    return rng;
43}
44
45    } // namespace range
46    using range::fill;
47}
48
49#endif // include guard
Note: See TracBrowser for help on using the repository browser.