diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 28b1a4242b..9b28958d33 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -312,13 +312,14 @@ struct expand_operator_less_than_tuple> : expand_operator_les } template -inline constexpr bool is_dereferenceable_v = false; +struct is_dereferenceable : std::false_type {}; template -inline constexpr bool is_dereferenceable_v().operator->())> > = true; +struct is_dereferenceable().operator->())> > + : std::true_type {}; template -using is_dereferenceable = std::bool_constant>; +inline constexpr bool is_dereferenceable_v = is_dereferenceable::value; template struct has_operator_equal : detail::expand_operator_equal {}; @@ -345,31 +346,25 @@ T &reference(); } -template -inline constexpr bool has_ostream_operator_v = false; - +template +struct has_ostream_operator : std::false_type {}; template -inline constexpr bool has_ostream_operator_v() << detail::const_reference())>> = true; - +struct has_ostream_operator() << detail::const_reference())>> + : std::true_type {}; template -using has_ostream_operator = std::bool_constant>; - - - -template -inline constexpr bool has_istream_operator_v = false; +inline constexpr bool has_ostream_operator_v = has_ostream_operator::value; +template +struct has_istream_operator : std::false_type {}; template -inline constexpr bool has_istream_operator_v() >> detail::reference())>> = true; - +struct has_istream_operator() >> detail::reference())>> + : std::true_type {}; template -using has_istream_operator = std::bool_constant>; +inline constexpr bool has_istream_operator_v = has_istream_operator::value; template inline constexpr bool has_stream_operator_v = has_ostream_operator_v && has_istream_operator_v; -template -using has_stream_operator = std::conjunction, has_istream_operator>; }