tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
destroy.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_MEMORY_DESTROY_HPP
5
#
define
TETL_MEMORY_DESTROY_HPP
6
7
#
include
<
etl
/
_memory
/
addressof
.
hpp
>
8
#
include
<
etl
/
_memory
/
destroy_at
.
hpp
>
9
10
namespace
etl
{
11
12
/// \brief Destroys the objects in the range [first, last).
13
template
<
typename
ForwardIt>
14
constexpr
auto
destroy
(ForwardIt first, ForwardIt last) ->
void
15
{
16
for
(; first != last; ++first) {
17
etl
::destroy_at(
etl
::addressof(*first));
18
}
19
}
20
21
}
// namespace etl
22
23
#
endif
// TETL_MEMORY_DESTROY_HPP
etl
Definition
adjacent_find.hpp:9
etl::destroy
constexpr auto destroy(ForwardIt first, ForwardIt last) -> void
Destroys the objects in the range [first, last).
Definition
destroy.hpp:14
include
etl
_memory
destroy.hpp
Generated on Sun Sep 7 2025 19:15:11 for tetl by
1.9.8