1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP 2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP 4 #include "phi/phi_config.hpp" 6 #if PHI_HAS_EXTENSION_PRAGMA_ONCE() 10 #include "phi/compiler_support/constexpr.hpp" 11 #include "phi/compiler_support/inline_variables.hpp" 12 #include "phi/compiler_support/intrinsics/is_destructible.hpp" 13 #include "phi/type_traits/integral_constant.hpp" 15 #if PHI_SUPPORTS_IS_DESTRUCTIBLE() 17 DETAIL_PHI_BEGIN_NAMESPACE()
19 template <typename TypeT>
23 template <
typename TypeT>
27 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 29 template <
typename TypeT>
30 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_destructible_v = PHI_IS_DESTRUCTIBLE(TypeT);
32 template <
typename TypeT>
33 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_destructible_v = !PHI_IS_DESTRUCTIBLE(TypeT);
39 # include "phi/core/declval.hpp" 40 # include "phi/type_traits/detail/yes_no_type.hpp" 41 # include "phi/type_traits/is_function.hpp" 42 # include "phi/type_traits/is_reference.hpp" 43 # include "phi/type_traits/remove_all_extents.hpp" 45 DETAIL_PHI_BEGIN_NAMESPACE()
55 template <
typename TypeT>
58 template <
typename Type1T>
62 template <
typename Type1T>
66 static PHI_CONSTEXPR_AND_CONST
bool value =
sizeof(test<TypeT>(12)) == sizeof_yes_type;
69 template <
typename TypeT,
bool>
72 template <
typename TypeT>
75 bool, is_destructor_wellformed<typename remove_all_extents<TypeT>::type>::value>
78 template <
typename TypeT>
82 template <
typename TypeT,
bool>
85 template <
typename TypeT>
90 template <
typename TypeT>
95 template <
typename TypeT>
99 template <
typename TypeT>
107 template <
typename TypeT>
111 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 113 template <
typename TypeT>
116 template <
typename TypeT>
123 DETAIL_PHI_END_NAMESPACE()
125 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_DESTRUCTIBLE_HPP Definition: integral_constant.hpp:19
Definition: test_macros.hpp:18
Definition: yes_no_type.hpp:32
Definition: is_destructible.hpp:108
Definition: is_destructible.hpp:96
Definition: is_destructible.hpp:70
Definition: yes_no_type.hpp:23
Definition: is_destructible.hpp:50
Definition: is_destructible.hpp:83