Skip to content

Commit

Permalink
Extend C++1z test to include variant APIs we use
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
  • Loading branch information
torarnv committed Aug 28, 2018
1 parent 2ef5362 commit 5b6eb8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 5b6eb8e

Please sign in to comment.