tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
copy.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_ALGORITHM_COPY_HPP
4#define TETL_ALGORITHM_COPY_HPP
5
6namespace etl {
7
17template <typename InputIt, typename OutputIt>
18constexpr auto copy(InputIt first, InputIt last, OutputIt destination) -> OutputIt
19{
20 for (; first != last; ++first, (void)++destination) {
21 *destination = *first;
22 }
23 return destination;
24}
25
26} // namespace etl
27
28#endif // TETL_ALGORITHM_COPY_HPP
constexpr auto copy(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Copies the elements in the range, defined by [first, last), to another range beginning at destination...
Definition copy.hpp:18
Definition adjacent_find.hpp:8