diff --git a/.travis.yml b/.travis.yml index 0fe2abb1..239ab0cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -258,6 +258,15 @@ matrix: addons: *gcc7 env: COMPILER='g++-7' EXAMPLES=1 COVERAGE=1 EXTRAS=1 CPP17=1 + - os: linux + dist: xenial + compiler: clang + addons: + apt: + sources: *all_sources + packages: ['clang-5.0'] + env: COMPILER='clang++-5.0' CPP17=1 + - os: linux dist: xenial compiler: clang diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index 9efda561..b6ef9fe2 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -234,7 +234,7 @@ // Check if byte is available and usable # if __has_include() && defined(CATCH_CPP17_OR_GREATER) # include - # if __cpp_lib_byte > 0 + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) # define CATCH_INTERNAL_CONFIG_CPP17_BYTE # endif # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) diff --git a/projects/SelfTest/UsageTests/Generators.tests.cpp b/projects/SelfTest/UsageTests/Generators.tests.cpp index f2906dbf..10c87707 100644 --- a/projects/SelfTest/UsageTests/Generators.tests.cpp +++ b/projects/SelfTest/UsageTests/Generators.tests.cpp @@ -58,12 +58,12 @@ TEST_CASE("tables", "[generators]") { // Structured bindings make the table utility much nicer to use TEST_CASE( "strlen2", "[approvals][generators]" ) { - auto [test_input, expected] = GENERATE( table({ - {"one", 3}, - {"two", 3}, - {"three", 5}, - {"four", 4} - })); + using tuple_type = std::tuple; // see above workaround + auto [test_input, expected] = + GENERATE( table( { tuple_type{ "one", 3 }, + tuple_type{ "two", 3 }, + tuple_type{ "three", 5 }, + tuple_type{ "four", 4 } } ) ); REQUIRE( test_input.size() == expected ); } @@ -99,11 +99,9 @@ TEST_CASE( "strlen3", "[generators]" ) { static auto eatCucumbers( int start, int eat ) -> int { return start-eat; } SCENARIO("Eating cucumbers", "[generators][approvals]") { - - auto [start, eat, left] = GENERATE( table ({ - { 12, 5, 7 }, - { 20, 5, 15 } - })); + using tuple_type = std::tuple; + auto [start, eat, left] = GENERATE( table( + { tuple_type{ 12, 5, 7 }, tuple_type{ 20, 5, 15 } } ) ); GIVEN( "there are " << start << " cucumbers" ) WHEN( "I eat " << eat << " cucumbers" )