From 5b6eb8e247d246a28bdc8ce533c52d7647a44a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 28 Aug 2018 14:42:26 +0200 Subject: Extend C++1z test to include variant APIs we use std::get and std::visit are only available on macOS 10.14, so as long as we're building with a deployment target lower than that, we can't enable C++1z globally unless we special-case use of those functions. Change-Id: Idb5eb5992ea4dd7eab92f5310321720e19ac793e Reviewed-by: Ville Voutilainen Reviewed-by: Simon Hausmann --- configure.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configure.json') diff --git a/configure.json b/configure.json index 07514992d1..2dc79137e8 100644 --- a/configure.json +++ b/configure.json @@ -283,7 +283,13 @@ "#else", "# error __cplusplus must be > 201402L (the value for C++14)", "#endif", - "#include // https://bugs.llvm.org//show_bug.cgi?id=33117" + "#include // https://bugs.llvm.org//show_bug.cgi?id=33117", + "#include " + ], + "main": [ + "std::variant v(42);", + "int i = std::get(v);", + "std::visit([](const auto &) { return 1; }, v);" ], "qmake": "CONFIG += c++11 c++14 c++1z" } -- cgit v1.2.3