1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_HPP 2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_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_constructible.hpp" 13 #include "phi/type_traits/integral_constant.hpp" 15 #if PHI_SUPPORTS_IS_CONSTRUCTIBLE() 17 # include "phi/compiler_support/warning.hpp" 19 # define PHI_HAS_WORKING_IS_DEFAULT_CONSTRUCTIBLE() 1 21 DETAIL_PHI_BEGIN_NAMESPACE()
23 PHI_GCC_SUPPRESS_WARNING_PUSH()
24 PHI_GCC_SUPPRESS_WARNING("-Wignored-qualifiers")
26 template <typename TypeT>
30 template <
typename TypeT>
34 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 36 template <
typename TypeT>
37 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_default_constructible_v = PHI_IS_CONSTRUCTIBLE(TypeT);
39 template <
typename TypeT>
40 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_default_constructible_v =
41 !PHI_IS_CONSTRUCTIBLE(TypeT);
45 PHI_GCC_SUPPRESS_WARNING_POP()
47 DETAIL_PHI_END_NAMESPACE()
51 # include "phi/core/size_t.hpp" 52 # include "phi/forward/std/pair.hpp" 53 # include "phi/type_traits/detail/yes_no_type.hpp" 54 # include "phi/type_traits/is_abstract.hpp" 55 # include "phi/type_traits/is_complete.hpp" 57 # if PHI_HAS_WORKING_IS_ABSTRACT() 58 # define PHI_HAS_WORKING_IS_DEFAULT_CONSTRUCTIBLE() 1 60 # define PHI_HAS_WORKING_IS_DEFAULT_CONSTRUCTIBLE() 0 63 DETAIL_PHI_BEGIN_NAMESPACE()
69 template <
typename TypeT,
typename = decltype(TypeT())>
76 template <
typename TypeT,
bool Boolean>
79 static PHI_CONSTEXPR_AND_CONST
bool value =
80 sizeof(is_default_constructible_imp::test<TypeT>(0)) == detail::sizeof_yes_type;
83 template <
typename TypeT>
86 static PHI_CONSTEXPR_AND_CONST
bool value =
false;
90 template <
typename TypeT>
92 :
public integral_constant<bool, detail::is_default_constructible_abstract_filter<
93 TypeT, is_abstract<TypeT>::value>::value>
96 "Arguments to is_default_constructible must be complete types");
99 template <
typename TypeT,
size_t Size>
103 template <
typename TypeT>
107 template <
typename TypeT>
111 template <
typename TypeT,
typename OtherT>
114 is_default_constructible<OtherT>::value>
117 template <
typename TypeT>
137 template <
typename TypeT>
142 # if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 144 template <
typename TypeT>
145 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_default_constructible_v =
148 template <
typename TypeT>
149 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_default_constructible_v =
154 DETAIL_PHI_END_NAMESPACE()
158 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_HPP Definition: integral_constant.hpp:19
Definition: is_default_constructible.hpp:138
Definition: is_default_constructible.hpp:91
Definition: test_macros.hpp:18
Definition: yes_no_type.hpp:32
Definition: initializer_list.hpp:21
Definition: is_default_constructible.hpp:77
Definition: is_complete.hpp:71
Definition: is_default_constructible.hpp:67
Definition: yes_no_type.hpp:23