From 932c10fcdadfb68590d1da88237021d58527d62e Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 23 Mar 2021 07:53:17 +0000 Subject: [PATCH] Revert "qtypeinfo: make variable templates inline" This reverts commit 6de9acf7793a299322923b3ac02142a5e5998842. Reason for revert: This might cause ICEs in clang Task-number: QTBUG-91782 Change-Id: I987d2242b04a22208b54ecbc386a1f6cfc625c1d Reviewed-by: Volker Hilsheimer --- src/corelib/global/qtypeinfo.h | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) 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>; }