From c84897c137711cb0a402426758ea1e9af9ff1796 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 23 Jun 2022 18:31:01 +0200 Subject: [PATCH] QDebug: add op<< for std::initializer_list We need it in QtHttpServer. [ChangeLog][QtCore][QDebug] Can now stream std::initializer_list. Change-Id: I3e940215fb4f4778bd782ea9b30960754ac23d47 Reviewed-by: Fabian Kosmale Reviewed-by: Thiago Macieira Reviewed-by: Ievgenii Meshcheriakov --- src/corelib/io/qdebug.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index b1f425e616e..22328e7c858 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -243,6 +243,12 @@ inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::list +inline QDebugIfHasDebugStream operator<<(QDebug debug, std::initializer_list list) +{ + return QtPrivate::printSequentialContainer(debug, "std::initializer_list", list); +} + template inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::map &map) {