annotate DEPENDENCIES/generic/include/boost/range/algorithm/replace_copy_if.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Copyright Neil Groves 2009. Use, modification and
Chris@16 2 // distribution is subject to the Boost Software License, Version
Chris@16 3 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 4 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5 //
Chris@16 6 //
Chris@16 7 // For more information, see http://www.boost.org/libs/range/
Chris@16 8 //
Chris@16 9 #ifndef BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
Chris@16 10 #define BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
Chris@16 11
Chris@16 12 #include <boost/concept_check.hpp>
Chris@16 13 #include <boost/range/begin.hpp>
Chris@16 14 #include <boost/range/end.hpp>
Chris@16 15 #include <boost/range/concepts.hpp>
Chris@16 16 #include <algorithm>
Chris@16 17
Chris@16 18 namespace boost
Chris@16 19 {
Chris@16 20 namespace range
Chris@16 21 {
Chris@16 22
Chris@16 23 /// \brief template function replace_copy_if
Chris@16 24 ///
Chris@16 25 /// range-based version of the replace_copy_if std algorithm
Chris@16 26 ///
Chris@16 27 /// \pre ForwardRange is a model of the ForwardRangeConcept
Chris@16 28 /// \pre Predicate is a model of the PredicateConcept
Chris@16 29 /// \pre Value is convertible to Predicate's argument type
Chris@16 30 /// \pre Value is Assignable
Chris@16 31 /// \pre Value is convertible to a type in OutputIterator's set of value types.
Chris@16 32 template< class ForwardRange, class OutputIterator, class Predicate, class Value >
Chris@16 33 inline OutputIterator
Chris@16 34 replace_copy_if(const ForwardRange& rng, OutputIterator out_it, Predicate pred,
Chris@16 35 const Value& with_what)
Chris@16 36 {
Chris@16 37 BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
Chris@16 38 return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it,
Chris@16 39 pred, with_what);
Chris@16 40 }
Chris@16 41
Chris@16 42 } // namespace range
Chris@16 43 using range::replace_copy_if;
Chris@16 44 } // namespace boost
Chris@16 45
Chris@16 46 #endif // include guard