From 9ef88ee93d21d5d67d3fb6815eac7dfb229086ea Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 30 Dec 2019 18:33:28 -0500 Subject: [PATCH] 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 | 9 +++++++++ tests/TransformTest.cpp | 2 ++ 2 files changed, 11 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 180e2973..be0191cc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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' diff --git a/tests/TransformTest.cpp b/tests/TransformTest.cpp index a3058e75..48a9cb32 100644 --- a/tests/TransformTest.cpp +++ b/tests/TransformTest.cpp @@ -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 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 };