1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 12:13:52 +00:00

Add C++11 check for Clang, protect C++14 test (#381)

* Add C++11 check for macOS

* Update azure-pipelines.yml

* Constexpr pair is C++14+ only on some impls
This commit is contained in:
Henry Schreiner 2019-12-30 18:33:28 -05:00 committed by GitHub
parent 8e8746a907
commit 9ef88ee93d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,15 @@ jobs:
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml
- job: Clang11
pool:
vmImage: 'macOS-latest'
variables:
cli11.std: 11
steps:
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml
- job: Meson
pool:
vmImage: 'ubuntu-latest'

View File

@ -199,6 +199,7 @@ TEST_F(TApp, SimpleNumericalTransformFnArray) {
EXPECT_EQ(value, 1);
}
#ifdef CLI11_CPP14
// zero copy constexpr array operation with transformer example and test
TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
constexpr std::pair<const char *, int> p1{"one", 1};
@ -219,6 +220,7 @@ TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
EXPECT_EQ(1u, opt->count());
EXPECT_EQ(value, 2);
}
#endif
TEST_F(TApp, EnumTransformFn) {
enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 };