1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_UNION_HPP 2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_UNION_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_union.hpp" 13 #include "phi/type_traits/integral_constant.hpp" 15 #if PHI_SUPPORTS_IS_UNION() 17 # define PHI_HAS_WORKING_IS_UNION() 1 19 DETAIL_PHI_BEGIN_NAMESPACE()
21 template <typename TypeT>
25 template <
typename TypeT>
29 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 31 template <
typename TypeT>
32 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_union_v = PHI_IS_UNION(TypeT);
34 template <
typename TypeT>
35 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_union_v = !PHI_IS_UNION(TypeT);
41 # include "phi/type_traits/false_t.hpp" 43 # define PHI_HAS_WORKING_IS_UNION() 0 45 DETAIL_PHI_BEGIN_NAMESPACE()
47 template <typename TypeT>
51 "phi::is_union requires compiler support to properly work.");
54 template <
typename TypeT>
58 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 60 template <
typename TypeT>
63 template <
typename TypeT>
70 DETAIL_PHI_END_NAMESPACE()
72 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_UNION_HPP Definition: integral_constant.hpp:19
Definition: is_union.hpp:55
Definition: false_t.hpp:29
Definition: is_union.hpp:48