tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ranges_destroy_at.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_MEMORY_RANGES_DESTROY_AT_HPP
4
#define TETL_MEMORY_RANGES_DESTROY_AT_HPP
5
6
#include <
etl/_concepts/destructible.hpp
>
7
#include <
etl/_memory/addressof.hpp
>
8
#include <
etl/_memory/destroy_at.hpp
>
9
#include <
etl/_type_traits/is_array.hpp
>
10
11
namespace
etl::ranges
{
12
13
inline
constexpr
struct
destroy_at_fn
{
14
template
<etl::destructible T>
15
constexpr
auto
operator()
(T* p)
const
noexcept
->
void
16
{
17
etl::destroy_at
(p);
18
}
19
}
destroy_at
;
20
21
}
// namespace etl::ranges
22
23
#endif
// TETL_MEMORY_RANGES_DESTROY_AT_HPP
addressof.hpp
destroy_at.hpp
destructible.hpp
is_array.hpp
etl::ranges
Definition
ranges_in_fun_result.hpp:11
etl::destroy_at
constexpr auto destroy_at(T *p) -> void
If T is not an array type, calls the destructor of the object pointed to by p, as if by p->~T()....
Definition
destroy_at.hpp:16
etl::ranges::destroy_at_fn
Definition
ranges_destroy_at.hpp:13
etl::ranges::destroy_at_fn::operator()
constexpr auto operator()(T *p) const noexcept -> void
Definition
ranges_destroy_at.hpp:15
include
etl
_memory
ranges_destroy_at.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0