tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
reverse_copy.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_ALGORITHM_REVERSE_COPY_HPP
4
#define TETL_ALGORITHM_REVERSE_COPY_HPP
5
6
namespace
etl
{
7
15
template
<
typename
B
id
irIt,
typename
OutputIt>
16
constexpr
auto
reverse_copy
(BidirIt first, BidirIt last, OutputIt destination) -> OutputIt
17
{
18
for
(; first != last; ++destination) {
19
*(destination) = *(--last);
20
}
21
return
destination;
22
}
23
24
}
// namespace etl
25
26
#endif
// TETL_ALGORITHM_REVERSE_COPY_HPP
etl::reverse_copy
constexpr auto reverse_copy(BidirIt first, BidirIt last, OutputIt destination) -> OutputIt
Copies the elements from the range [first, last) to another range beginning at d_first in such a way ...
Definition
reverse_copy.hpp:16
etl
Definition
adjacent_find.hpp:8
include
etl
_algorithm
reverse_copy.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0