mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Use string_view if _HAS_CXX17 is true (#4876)
Current version of VC2017 is not setting __cplusplus to correct value, instead they use _MSC_VER, _MSVC_LANG and _HAS_CXX17 macros.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
ed2415eb72
commit
55289c55bf
@@ -158,7 +158,7 @@
|
||||
// to detect a header that provides an implementation
|
||||
#if defined(__has_include)
|
||||
// Check for std::string_view (in c++17)
|
||||
#if __has_include(<string_view>) && (__cplusplus >= 201606)
|
||||
#if __has_include(<string_view>) && (__cplusplus >= 201606 || _HAS_CXX17)
|
||||
#include <string_view>
|
||||
namespace flatbuffers {
|
||||
typedef std::string_view string_view;
|
||||
|
||||
Reference in New Issue
Block a user