Add string_view support

This avoids unnecessary string copies on often used
find().
This commit is contained in:
Jamie Seward 2017-10-21 15:20:13 -07:00
parent 33df3250c3
commit 1a66679929
2 changed files with 40 additions and 9 deletions

View file

@ -80,6 +80,11 @@ if(MSVC)
# Disable warning C4566: character represented by universal-character-name '\uFF01' cannot be represented in the current code page (1252)
# Disable warning C4996: 'nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>::operator <<': was declared deprecated
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4389 /wd4309 /wd4566 /wd4996")
if(MSVC_VERSION GREATER_EQUAL 1910)
# Enable c++17 support in Visual Studio 2017 (for testing string_view support)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
endif()
endif()
#############################################################################