From 3ef8ec2ee187b949b3f6840ca03bcc0e814c00a9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 6 Jul 2020 14:06:08 +0200 Subject: Constrain the data stream operators for containers Check that we can successfully instantiate the data stream operator for a container before we actually try. This is required so we can automate registration of debug stream operators with QMetaType. Change-Id: Ib100a5242470d7fc8067058cc4d81af2fa9354b0 Reviewed-by: Fabian Kosmale --- tests/auto/corelib/io/qdebug/tst_qdebug.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/auto/corelib/io/qdebug/tst_qdebug.cpp') diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index 72412aa44d..0b54f53517 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -35,11 +35,13 @@ #include #include -static_assert(QTypeTraits::has_ostream_v); -static_assert(QTypeTraits::has_ostream_v>); +static_assert(QTypeTraits::has_ostream_operator_v); +static_assert(QTypeTraits::has_ostream_operator_v>); +static_assert(QTypeTraits::has_ostream_operator_v>); struct NonStreamable {}; -static_assert(!QTypeTraits::has_ostream_v); -static_assert(!QTypeTraits::has_ostream_v>); +static_assert(!QTypeTraits::has_ostream_operator_v); +static_assert(!QTypeTraits::has_ostream_operator_v>); +static_assert(!QTypeTraits::has_ostream_operator_v>); class tst_QDebug: public QObject { -- cgit v1.2.3