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// SPDX-FileCopyrightText: Copyright (C) 2024 Tobias Hienzsch
3
4#ifndef TETL_MEMORY_RANGES_DESTROY_AT_HPP
5#define TETL_MEMORY_RANGES_DESTROY_AT_HPP
6
7#include <etl/_concepts/destructible.hpp>
8#include <etl/_memory/addressof.hpp>
9#include <etl/_memory/destroy_at.hpp>
10#include <etl/_type_traits/is_array.hpp>
11
12namespace etl::ranges {
13
14inline constexpr struct destroy_at_fn {
15 template <etl::destructible T>
16 constexpr auto operator()(T* p) const noexcept -> void
17 {
18 etl::destroy_at(p);
19 }
20} destroy_at;
21
22} // namespace etl::ranges
23
24#endif // TETL_MEMORY_RANGES_DESTROY_AT_HPP
Definition ranges_in_fun_result.hpp:12
Definition adjacent_find.hpp:9
Definition ranges_destroy_at.hpp:14
constexpr auto operator()(T *p) const noexcept -> void
Definition ranges_destroy_at.hpp:16