/
usr
/
include
/
boost
/
range
/
algorithm
/
/usr/include/boost/range/algorithm
mkdir
upload
Name
Size
Mode
Actions
adjacent_find.hpp
4388
0644
edit
dl
rm
binary_search.hpp
1570
0644
edit
dl
rm
copy.hpp
1230
0644
edit
dl
rm
copy_backward.hpp
1485
0644
edit
dl
rm
count.hpp
1542
0644
edit
dl
rm
count_if.hpp
1673
0644
edit
dl
rm
equal.hpp
9018
0644
edit
dl
rm
equal_range.hpp
2765
0644
edit
dl
rm
fill.hpp
1361
0644
edit
dl
rm
fill_n.hpp
1692
0644
edit
dl
rm
find.hpp
2549
0644
edit
dl
rm
find_end.hpp
5780
0644
edit
dl
rm
find_first_of.hpp
6128
0644
edit
dl
rm
find_if.hpp
2723
0644
edit
dl
rm
for_each.hpp
3737
0644
edit
dl
rm
generate.hpp
1479
0644
edit
dl
rm
heap_algorithm.hpp
6408
0644
edit
dl
rm
inplace_merge.hpp
2578
0644
edit
dl
rm
lexicographical_compare.hpp
2105
0644
edit
dl
rm
lower_bound.hpp
4390
0644
edit
dl
rm
max_element.hpp
4405
0644
edit
dl
rm
merge.hpp
2208
0644
edit
dl
rm
min_element.hpp
4405
0644
edit
dl
rm
mismatch.hpp
7983
0644
edit
dl
rm
nth_element.hpp
2501
0644
edit
dl
rm
partial_sort.hpp
2586
0644
edit
dl
rm
partial_sort_copy.hpp
2899
0644
edit
dl
rm
partition.hpp
2445
0644
edit
dl
rm
permutation.hpp
3753
0644
edit
dl
rm
random_shuffle.hpp
3569
0644
edit
dl
rm
remove.hpp
2344
0644
edit
dl
rm
remove_copy.hpp
1448
0644
edit
dl
rm
remove_copy_if.hpp
1450
0644
edit
dl
rm
remove_if.hpp
2517
0644
edit
dl
rm
replace.hpp
1498
0644
edit
dl
rm
replace_copy.hpp
1259
0644
edit
dl
rm
replace_copy_if.hpp
1516
0644
edit
dl
rm
replace_if.hpp
1634
0644
edit
dl
rm
reverse.hpp
1450
0644
edit
dl
rm
reverse_copy.hpp
1246
0644
edit
dl
rm
rotate.hpp
1480
0644
edit
dl
rm
rotate_copy.hpp
1440
0644
edit
dl
rm
search.hpp
5425
0644
edit
dl
rm
search_n.hpp
13554
0644
edit
dl
rm
set_algorithm.hpp
8661
0644
edit
dl
rm
sort.hpp
2062
0644
edit
dl
rm
stable_partition.hpp
2711
0644
edit
dl
rm
stable_sort.hpp
2173
0644
edit
dl
rm
swap_ranges.hpp
4518
0644
edit
dl
rm
transform.hpp
3484
0644
edit
dl
rm
unique.hpp
3810
0644
edit
dl
rm
unique_copy.hpp
1694
0644
edit
dl
rm
upper_bound.hpp
4403
0644
edit
dl
rm
Edit:
/usr/include/boost/range/algorithm/for_each.hpp
(3737B)
// Copyright Neil Groves 2009. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED #define BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED #include <boost/concept_check.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/concepts.hpp> #include <boost/utility/enable_if.hpp> #include <boost/ref.hpp> #include <algorithm> #if BOOST_WORKAROUND(BOOST_MSVC, == 1600) #include <xutility> #endif namespace boost { namespace range { #if BOOST_WORKAROUND(BOOST_MSVC, == 1600) namespace for_each_detail { template<typename Iterator, typename UnaryFunction> inline UnaryFunction for_each_impl(Iterator first, Iterator last, UnaryFunction fun, typename ::boost::enable_if< is_reference_wrapper<UnaryFunction>, void >::type* = 0) { typedef typename std::_Get_unchecked_type<Iterator>::type unchecked_iterator; unchecked_iterator unchecked_last = std::_Unchecked(last); for (unchecked_iterator unchecked_first = std::_Unchecked(first); first != last; ++first) fun.get()(*unchecked_first); return fun; } template<typename Iterator, typename UnaryFunction> inline UnaryFunction for_each_impl(Iterator first, Iterator last, UnaryFunction fn, typename disable_if< is_reference_wrapper<UnaryFunction>, void >::type* = 0) { return std::for_each<Iterator, UnaryFunction>(first, last, fn); } } #endif /// \brief template function for_each /// /// range-based version of the for_each std algorithm /// /// \pre SinglePassRange is a model of the SinglePassRangeConcept /// \pre UnaryFunction is a model of the UnaryFunctionConcept template< class SinglePassRange, class UnaryFunction > inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); #if BOOST_WORKAROUND(BOOST_MSVC, == 1600) return for_each_detail::for_each_impl< typename range_iterator<SinglePassRange>::type, UnaryFunction >(boost::begin(rng), boost::end(rng), fun); #else return std::for_each< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type, UnaryFunction >(boost::begin(rng),boost::end(rng),fun); #endif } /// \overload template< class SinglePassRange, class UnaryFunction > inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); #if BOOST_WORKAROUND(BOOST_MSVC, == 1600) return for_each_detail::for_each_impl< typename range_iterator<const SinglePassRange>::type, UnaryFunction >(boost::begin(rng), boost::end(rng), fun); #else return std::for_each< BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type, UnaryFunction >(boost::begin(rng), boost::end(rng), fun); #endif } } // namespace range using range::for_each; } // namespace boost #endif // include guard
Save
cmd:
run