tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_trivially_destructible.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_TRVIALLY_DETRUCTIBLE_HPP
4#define TETL_TYPE_TRAITS_IS_TRVIALLY_DETRUCTIBLE_HPP
5
6#include <etl/_config/all.hpp>
7
9
10namespace etl {
11
16template <typename T>
18
19#if __has_builtin(__is_trivially_destructible)
20
21template <typename T>
22struct is_trivially_destructible : bool_constant<__is_trivially_destructible(T)> { };
23
24template <typename T>
25inline constexpr bool is_trivially_destructible_v = __is_trivially_destructible(T);
26
27#else
28
29template <typename T>
30struct is_trivially_destructible : bool_constant<__has_trivial_destructor(T)> { };
31
32template <typename T>
33inline constexpr bool is_trivially_destructible_v = __has_trivial_destructor(T);
34
35#endif
36} // namespace etl
37
38#endif // TETL_TYPE_TRAITS_IS_TRVIALLY_DETRUCTIBLE_HPP
Definition adjacent_find.hpp:8
constexpr bool is_trivially_destructible_v
Definition is_trivially_destructible.hpp:33
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
Storage occupied by trivially destructible objects may be reused without calling the destructor.
Definition is_trivially_destructible.hpp:30