1 #ifndef INCG_PHI_CORE_TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_HPP 2 #define INCG_PHI_CORE_TYPE_TRAITS_IS_IMPLICITLY_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/warning.hpp" 13 #include "phi/type_traits/integral_constant.hpp" 14 #include "phi/type_traits/is_default_constructible.hpp" 16 PHI_GCC_SUPPRESS_WARNING_PUSH()
17 PHI_GCC_SUPPRESS_WARNING("-Wignored-qualifiers")
19 #if PHI_HAS_WORKING_IS_DEFAULT_CONSTRUCTIBLE() 20 # define PHI_HAS_WORKING_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE() 1 22 # define PHI_HAS_WORKING_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE() 0 25 DETAIL_PHI_BEGIN_NAMESPACE()
29 template <
typename TypeT>
30 void test_implicit_default_constructible(TypeT);
33 template <typename TypeT, class = void, typename = typename is_default_constructible<TypeT>::type>
37 template <
typename TypeT>
39 TypeT, decltype(
detail::test_implicit_default_constructible<TypeT const&>({})),
true_type>
43 template <
typename TypeT>
45 TypeT, decltype(
detail::test_implicit_default_constructible<TypeT const&>({})),
false_type>
49 template <
typename TypeT>
51 :
public integral_constant<bool, !is_implicitly_default_constructible<TypeT>::value>
54 PHI_GCC_SUPPRESS_WARNING_POP()
56 #if PHI_HAS_FEATURE_VARIABLE_TEMPLATE() 58 template <
typename TypeT>
59 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_implicitly_default_constructible_v =
62 template <
typename TypeT>
63 PHI_INLINE_VARIABLE PHI_CONSTEXPR
bool is_not_implicitly_default_constructible_v =
68 DETAIL_PHI_END_NAMESPACE()
70 #endif // INCG_PHI_CORE_TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_HPP Definition: integral_constant.hpp:19
Definition: is_implicitly_default_constructible.hpp:34
Definition: is_implicitly_default_constructible.hpp:50