From c800e96523d4561f5ac08b5d570ca5e2f5d2a25b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 16 Oct 2020 12:08:54 +0200 Subject: [PATCH] qtypeinfo.h: We only need a const reference for most operator<< If we require a value, then we need a dtor, too. This is not always the case. For example QSessionManager has a private dtor, leading to failures. Change-Id: I3f715848ff5c63b2ea2773c17bced21e7a814ca9 Reviewed-by: Lars Knoll --- src/corelib/global/qtypeinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 4b29d0bf53..d7cdb8b5d4 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -356,7 +356,7 @@ using compare_lt_result = std::enable_if_t -const T const_value(); +const T &const_reference(); template T &reference(); @@ -365,7 +365,7 @@ T &reference(); template struct has_ostream_operator : std::false_type {}; template -struct has_ostream_operator() << detail::const_value())>> +struct has_ostream_operator() << detail::const_reference())>> : std::true_type {}; template constexpr bool has_ostream_operator_v = has_ostream_operator::value;