From c63b962cb31ec4c2577a9466eb3848db402ab9b7 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 28 Nov 2019 08:09:37 +0100 Subject: [PATCH] Fix Clang incompatibility. std::strchar should return const pointer for const input but it doesn't. --- 2019/tests/test_solutions.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/2019/tests/test_solutions.cpp b/2019/tests/test_solutions.cpp index 620c003..ea870bc 100644 --- a/2019/tests/test_solutions.cpp +++ b/2019/tests/test_solutions.cpp @@ -1,5 +1,3 @@ -#define BOOST_TEST_MODULE solutions_tests - #include #include #include @@ -59,7 +57,7 @@ std::tuple SolutionsTest::parseInputName(const std::stri res = std::from_chars(base_name + 3, base_name + 4, part); assert(res.ec == std::errc()); - return {day, part == 2, std::string(base_name + 5, std::strchr(base_name, '.'))}; + return {day, part == 2, std::string(base_name + 5, (const char*) std::strchr(base_name, '.'))}; } std::string SolutionsTest::nameInstantiatedTest(const testing::TestParamInfo ¶mInfo) {