Commit 9ef88ee93d21d5d67d3fb6815eac7dfb229086ea

Authored by Henry Schreiner
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
azure-pipelines.yml
... ... @@ -46,6 +46,15 @@ jobs:
46 46 - template: .ci/azure-build.yml
47 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 58 - job: Meson
50 59 pool:
51 60 vmImage: 'ubuntu-latest'
... ...
tests/TransformTest.cpp
... ... @@ -199,6 +199,7 @@ TEST_F(TApp, SimpleNumericalTransformFnArray) {
199 199 EXPECT_EQ(value, 1);
200 200 }
201 201  
  202 +#ifdef CLI11_CPP14
202 203 // zero copy constexpr array operation with transformer example and test
203 204 TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
204 205 constexpr std::pair<const char *, int> p1{"one", 1};
... ... @@ -219,6 +220,7 @@ TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
219 220 EXPECT_EQ(1u, opt->count());
220 221 EXPECT_EQ(value, 2);
221 222 }
  223 +#endif
222 224  
223 225 TEST_F(TApp, EnumTransformFn) {
224 226 enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 };
... ...