aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index 596872e2..f7f646da 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -52,6 +52,14 @@ template <typename T>
static void qAsConst(const T &&) Q_DECL_EQ_DELETE;
#endif
+// MSVC 2015 and older GCC's don't handle initialisation from initializer lists
+// right in the absense of a constructor; MSVC 2015, notably, fails with
+// "error C2440: 'return': cannot convert from 'initializer list' to '<type>'"
+#if (defined(_MSC_VER) && _MSC_VER < 1910) || \
+ (defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 4)
+# define BROKEN_INITIALIZER_LISTS
+#endif
+
namespace QMatrixClient
{
// The below enables pretty-printing of enums in logs