4#ifndef TETL_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP
5#define TETL_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP
7#include <etl/_type_traits/bool_constant.hpp>
8#include <etl/_type_traits/declval.hpp>
9#include <etl/_type_traits/disjunction.hpp>
10#include <etl/_type_traits/extent.hpp>
11#include <etl/_type_traits/is_function.hpp>
12#include <etl/_type_traits/is_reference.hpp>
13#include <etl/_type_traits/is_scalar.hpp>
14#include <etl/_type_traits/is_unbounded_array.hpp>
15#include <etl/_type_traits/is_void.hpp>
16#include <etl/_type_traits/remove_all_extents.hpp>
17#include <etl/_type_traits/type_identity.hpp>
23struct try_is_destructible_impl {
24 template <
typename T,
typename =
decltype(
etl::declval<T&>().~T())>
25 static auto test(
int) ->
etl::true_type;
28 static auto test(...) ->
etl::false_type;
32struct is_destructible_impl : try_is_destructible_impl {
33 using type =
decltype(test<T>(0));
41struct is_destructible_safe;
44struct is_destructible_safe<T,
false,
false> : is_destructible_impl<
typename etl::remove_all_extents_t<T>>::type { };
47struct is_destructible_safe<T,
true,
false> :
etl::false_type { };
50struct is_destructible_safe<T,
false,
true> :
etl::true_type { };
64template <
typename Type>
Definition adjacent_find.hpp:9
constexpr auto is_destructible_v
Definition is_destructible.hpp:71
Forms the logical disjunction of the type traits B..., effectively performing a logical OR on the seq...
Definition disjunction.hpp:15
Because the C++ program terminates if a destructor throws an exception during stack unwinding (which ...
Definition is_destructible.hpp:62
Checks whether T is an array type of unknown bound. Provides the member constant value which is equal...
Definition is_unbounded_array.hpp:15