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>
This commit is contained in:
parent
2ef5362011
commit
5b6eb8e247
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user