summaryrefslogtreecommitdiffstats
path: root/configure.json
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-28 14:42:26 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-28 13:55:15 +0000
commit5b6eb8e247d246a28bdc8ce533c52d7647a44a90 (patch)
tree562aa6c8bd03189b58095a39ed6c9a57a810bb8c /configure.json
parent2ef53620115037015d44d9629ee1e12da44be715 (diff)
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 <ville.voutilainen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'configure.json')
-rw-r--r--configure.json8
1 files changed, 7 insertions, 1 deletions
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 <map> // https://bugs.llvm.org//show_bug.cgi?id=33117"
+ "#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117",
+ "#include <variant>"
+ ],
+ "main": [
+ "std::variant<int> v(42);",
+ "int i = std::get<int>(v);",
+ "std::visit([](const auto &) { return 1; }, v);"
],
"qmake": "CONFIG += c++11 c++14 c++1z"
}