Skip to content

Commit d7dcc53

Browse files
committed
Check using Visual Studio without setting /std:
1 parent 4880566 commit d7dcc53

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/tao/json/external/string_view.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
#if( __cplusplus >= 201703L )
99
#define TAOCPP_USE_STD_STRING_VIEW
1010
#elif defined( _MSC_VER ) && ( _MSC_VER >= 1910L )
11+
#if defined( _MSC_LANG ) && ( _MSC_LANG >= 201703L )
1112
#define TAOCPP_USE_STD_STRING_VIEW
1213
#endif
1314
#endif
15+
#endif
1416

1517
#ifndef TAOCPP_USE_STD_STRING_VIEW
1618
#ifndef TAOCPP_USE_TS_STRING_VIEW

src/test/json/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ foreach (testsourcefile ${testsources})
77
set_property (TARGET ${exename} PROPERTY CXX_EXTENSIONS OFF)
88
target_link_libraries (${exename} taocpp::json)
99
if (MSVC)
10-
target_compile_options (${exename} PRIVATE /std:c++17 /W4 /WX /utf-8)
10+
target_compile_options (${exename} PRIVATE /W4 /WX /utf-8)
1111
else ()
1212
target_compile_options (${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
1313
endif ()

0 commit comments

Comments
 (0)