mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 04:33:53 +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:
parent
8e8746a907
commit
9ef88ee93d
@ -46,6 +46,15 @@ jobs:
|
|||||||
- template: .ci/azure-build.yml
|
- template: .ci/azure-build.yml
|
||||||
- template: .ci/azure-test.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
|
- job: Meson
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
|
@ -199,6 +199,7 @@ TEST_F(TApp, SimpleNumericalTransformFnArray) {
|
|||||||
EXPECT_EQ(value, 1);
|
EXPECT_EQ(value, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CLI11_CPP14
|
||||||
// zero copy constexpr array operation with transformer example and test
|
// zero copy constexpr array operation with transformer example and test
|
||||||
TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
|
TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
|
||||||
constexpr std::pair<const char *, int> p1{"one", 1};
|
constexpr std::pair<const char *, int> p1{"one", 1};
|
||||||
@ -219,6 +220,7 @@ TEST_F(TApp, SimpleNumericalTransformFnconstexprArray) {
|
|||||||
EXPECT_EQ(1u, opt->count());
|
EXPECT_EQ(1u, opt->count());
|
||||||
EXPECT_EQ(value, 2);
|
EXPECT_EQ(value, 2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_F(TApp, EnumTransformFn) {
|
TEST_F(TApp, EnumTransformFn) {
|
||||||
enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 };
|
enum class test : int16_t { val1 = 3, val2 = 4, val3 = 17 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user