Skip to content

Commit f08b408

Browse files
committed
Use workaround based on compiler version
1 parent b287aec commit f08b408

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
#include <nlohmann/json-qt.hpp>
2929
#include <nlohmann/json.hpp>
3030

31-
// Workaround for a compile error when using mingw 13 with Qt6
32-
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
31+
// Workaround for a compile error when using gcc 13 caused by a metatype usage with nlohmann::json
32+
// In instantiation of 'struct std::is_default_constructible<tagMSG>':
33+
// error: static assertion failed: template argument must be a complete class or an unbounded array
34+
#if __GNUC__ >= 13
3335
namespace QTypeTraits {
3436
template<>
3537
struct has_ostream_operator<QDebug, nlohmann::json> : std::false_type

0 commit comments

Comments
 (0)