tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iter_swap.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4
#
ifndef
TETL_ALGORITHM_ITER_SWAP_HPP
5
#
define
TETL_ALGORITHM_ITER_SWAP_HPP
6
7
#
include
<
etl
/
_utility
/
swap
.
hpp
>
8
9
namespace
etl
{
10
11
/// \brief Swaps the values of the elements the given iterators are pointing to.
12
///
13
/// \param a Iterators to the elements to swap.
14
/// \param b Iterators to the elements to swap.
15
///
16
/// https://en.cppreference.com/w/cpp/algorithm/iter_swap
17
///
18
/// \ingroup algorithm
19
template
<
typename
ForwardIt1,
typename
ForwardIt2>
20
constexpr
auto
iter_swap
(ForwardIt1 a, ForwardIt2 b) ->
void
21
{
22
using
etl
::swap;
23
swap(*a, *b);
24
}
25
26
}
// namespace etl
27
28
#
endif
// TETL_ALGORITHM_ITER_SWAP_HPP
etl::iter_swap
constexpr auto iter_swap(ForwardIt1 a, ForwardIt2 b) -> void
Swaps the values of the elements the given iterators are pointing to.
Definition
iter_swap.hpp:20
etl
Definition
adjacent_find.hpp:9
include
etl
_algorithm
iter_swap.hpp
Generated on Sun Sep 7 2025 19:14:46 for tetl by
1.9.8