Commit 9ef88ee93d21d5d67d3fb6815eac7dfb229086ea
Committed by
GitHub
1 parent
8e8746a9
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
Showing
2 changed files
with
11 additions
and
0 deletions
azure-pipelines.yml
| @@ -46,6 +46,15 @@ jobs: | @@ -46,6 +46,15 @@ jobs: | ||
| 46 | - template: .ci/azure-build.yml | 46 | - template: .ci/azure-build.yml |
| 47 | - template: .ci/azure-test.yml | 47 | - template: .ci/azure-test.yml |
| 48 | 48 | ||
| 49 | +- job: Clang11 | ||
| 50 | + pool: | ||
| 51 | + vmImage: 'macOS-latest' | ||
| 52 | + variables: | ||
| 53 | + cli11.std: 11 | ||
| 54 | + steps: | ||
| 55 | + - template: .ci/azure-build.yml | ||
| 56 | + - template: .ci/azure-test.yml | ||
| 57 | + | ||
| 49 | - job: Meson | 58 | - job: Meson |
| 50 | pool: | 59 | pool: |
| 51 | vmImage: 'ubuntu-latest' | 60 | vmImage: 'ubuntu-latest' |
tests/TransformTest.cpp
| @@ -199,6 +199,7 @@ TEST_F(TApp, SimpleNumericalTransformFnArray) { | @@ -199,6 +199,7 @@ TEST_F(TApp, SimpleNumericalTransformFnArray) { | ||
| 199 | EXPECT_EQ(value, 1); | 199 | EXPECT_EQ(value, 1); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | +#ifdef CLI11_CPP14 | ||
| 202 | // zero copy constexpr array operation with transformer example and test | 203 | // zero copy constexpr array operation with transformer example and test |
| 203 | TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) { | 204 | TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) { |
| 204 | constexpr std::pair<const char *, int> p1{"one", 1}; | 205 | constexpr std::pair<const char *, int> p1{"one", 1}; |
| @@ -219,6 +220,7 @@ TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) { | @@ -219,6 +220,7 @@ TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) { | ||
| 219 | EXPECT_EQ(1u, opt->count()); | 220 | EXPECT_EQ(1u, opt->count()); |
| 220 | EXPECT_EQ(value, 2); | 221 | EXPECT_EQ(value, 2); |
| 221 | } | 222 | } |
| 223 | +#endif | ||
| 222 | 224 | ||
| 223 | TEST_F(TApp, EnumTransformFn) { | 225 | TEST_F(TApp, EnumTransformFn) { |
| 224 | enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 }; | 226 | enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 }; |