tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_nothrow_destructible.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP
4#define TETL_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP
5
9
10namespace etl {
11
12namespace detail {
13template <bool, typename Type>
14struct is_nothrow_destructible_helper;
15
16template <typename Type>
17struct is_nothrow_destructible_helper<false, Type> : etl::false_type { };
18
19template <typename Type>
20struct is_nothrow_destructible_helper<true, Type> : etl::bool_constant<noexcept(etl::declval<Type>().~Type())> { };
21} // namespace detail
22
24template <typename Type>
25struct is_nothrow_destructible : detail::is_nothrow_destructible_helper<is_destructible_v<Type>, Type> { };
26
27template <typename Type, size_t N>
29
30template <typename Type>
32
33template <typename Type>
35
36template <typename T>
38
39} // namespace etl
40
41#endif // TETL_TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_HPP
Definition adjacent_find.hpp:8
bool_constant< true > true_type
Definition bool_constant.hpp:13
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
bool_constant< false > false_type
Definition bool_constant.hpp:14
constexpr bool is_nothrow_destructible_v
Definition is_nothrow_destructible.hpp:37
https://en.cppreference.com/w/cpp/types/is_destructible
Definition is_nothrow_destructible.hpp:25