tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
copy_backward.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ALGORITHM_COPY_BACKWARD_HPP
4
#define TETL_ALGORITHM_COPY_BACKWARD_HPP
5
6
namespace
etl
{
7
17
template
<
typename
B
id
irIt1,
typename
B
id
irIt2>
18
constexpr
auto
copy_backward
(BidirIt1 first, BidirIt1 last, BidirIt2 dLast) -> BidirIt2
19
{
20
while
(first != last) {
21
*(--dLast) = *(--last);
22
}
23
return
dLast;
24
}
25
26
}
// namespace etl
27
28
#endif
// TETL_ALGORITHM_COPY_BACKWARD_HPP
etl::copy_backward
constexpr auto copy_backward(BidirIt1 first, BidirIt1 last, BidirIt2 dLast) -> BidirIt2
Copies the elements from the range, defined by [first, last), to another range ending at dLast....
Definition
copy_backward.hpp:18
etl
Definition
adjacent_find.hpp:8
include
etl
_algorithm
copy_backward.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0