From ca56d8d7fbac71fc45b56821cf2f3a7575720162 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 2 Feb 2021 20:54:52 +0200 Subject: [PATCH] msvc-14.2 /std:c++latest no longer allows literal to char* conversions --- test/winmain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/winmain.cpp b/test/winmain.cpp index 20dc9c5..4cbcad5 100644 --- a/test/winmain.cpp +++ b/test/winmain.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace boost::program_options; -void check_equal(const std::vector& actual, char **expected, int n) +void check_equal(const std::vector& actual, const char **expected, int n) { if (actual.size() != n) { @@ -38,7 +38,7 @@ void test_winmain() #define C , #define TEST(input, expected) \ - char* BOOST_PP_CAT(e, __LINE__)[] = expected;\ + const char* BOOST_PP_CAT(e, __LINE__)[] = expected;\ vector BOOST_PP_CAT(v, __LINE__) = split_winmain(input);\ check_equal(BOOST_PP_CAT(v, __LINE__), BOOST_PP_CAT(e, __LINE__),\ sizeof(BOOST_PP_CAT(e, __LINE__))/sizeof(char*));