msvc-14.2 /std:c++latest no longer allows literal to char* conversions (#105)

This commit is contained in:
Peter Dimov
2021-02-02 21:24:32 +02:00
committed by GitHub
parent f62555fa75
commit 3c0d0fa6ee

View File

@@ -14,7 +14,7 @@
using namespace std;
using namespace boost::program_options;
void check_equal(const std::vector<string>& actual, char **expected, int n)
void check_equal(const std::vector<string>& 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<string> 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*));