13#include "../defines.h"
30 template <class ForwardIt, class T = typename std::iterator_traits<ForwardIt>::value_type>
31 PONCA_MULTIARCH
void fill(ForwardIt first, ForwardIt last,
const T& value)
34 for (; first != last; ++first)
37 std::fill(first, last, value);
54 template <class ForwardIt, class T = typename std::iterator_traits<ForwardIt>::value_type,
class Compare>
55 PONCA_MULTIARCH ForwardIt
upperBound(ForwardIt first, ForwardIt last, const T& value, Compare comp)
59 typename std::iterator_traits<ForwardIt>::difference_type count, step;
68 if (!comp(value, *it))
79 return std::upper_bound(first, last, value, comp);
96 template <
class B
idirIt1,
class B
idirIt2>
97 PONCA_MULTIARCH BidirIt2
copyBackward(BidirIt1 first, BidirIt1 last, BidirIt2 d_last)
100 while (first != last)
101 *(--d_last) = *(--last);
104 return std::copy_backward(first, last, d_last);
Copyright (c) 2022 Jacques-Olivier Lachaud (jacques-olivier.lachaud@univ-savoie.fr) Laboratory of Mat...
BidirIt2 copyBackward(BidirIt1 first, BidirIt1 last, BidirIt2 d_last)
Copies the elements from the range [first, last) to another range ending at d_last.
void fill(ForwardIt first, ForwardIt last, const T &value)
Assigns the given value to all elements in the range [first, last).
ForwardIt upperBound(ForwardIt first, ForwardIt last, const T &value, Compare comp)
Searches for the first element in the partitioned range [first, last) which is ordered after value.