From b294927a1270f7d0c5aaf0bbe93b617ac995e149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Brooke?= Date: Sun, 14 Jul 2024 11:44:55 +0200 Subject: [PATCH] QDebug: add support for std::array [ChangeLog][QtCore][QDebug] Can now output std::array Change-Id: I1f03ddd2e5995ba550d73e785d7449603a0db302 Reviewed-by: Thiago Macieira --- src/corelib/io/qdebug.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 44c3dea804b..e679af4786f 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -18,6 +18,7 @@ #include // all these have already been included by various headers above, but don't rely on indirect includes: +#include #include #include #include @@ -334,6 +335,12 @@ inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::vector +inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::array &array) +{ + return QtPrivate::printSequentialContainer(std::move(debug), "std::array", array); +} + template inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::list &vec) { @@ -431,6 +438,9 @@ QDebug operator<<(QDebug debug, const QVarLengthArray &array); template QDebug operator<<(QDebug debug, const std::vector &vec); +template +QDebug operator<<(QDebug debug, const std::array &array); + template QDebug operator<<(QDebug debug, const std::list &vec);