Skip to content

Commit 3c0d0fa

Browse files
authored
msvc-14.2 /std:c++latest no longer allows literal to char* conversions (#105)
1 parent f62555f commit 3c0d0fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/winmain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using namespace std;
1515
using namespace boost::program_options;
1616

17-
void check_equal(const std::vector<string>& actual, char **expected, int n)
17+
void check_equal(const std::vector<string>& actual, const char **expected, int n)
1818
{
1919
if (actual.size() != n)
2020
{
@@ -38,7 +38,7 @@ void test_winmain()
3838

3939
#define C ,
4040
#define TEST(input, expected) \
41-
char* BOOST_PP_CAT(e, __LINE__)[] = expected;\
41+
const char* BOOST_PP_CAT(e, __LINE__)[] = expected;\
4242
vector<string> BOOST_PP_CAT(v, __LINE__) = split_winmain(input);\
4343
check_equal(BOOST_PP_CAT(v, __LINE__), BOOST_PP_CAT(e, __LINE__),\
4444
sizeof(BOOST_PP_CAT(e, __LINE__))/sizeof(char*));

0 commit comments

Comments
 (0)