Merge pull request #56 from cstratopoulos/patch-1

Make C++17 string_view detection work with MSVC
This commit is contained in:
Arun Muralidharan 2019-11-23 22:48:45 +05:30 committed by GitHub
commit d8197361fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ SOFTWARE.
#ifndef JWT_STRING_VIEW_HPP #ifndef JWT_STRING_VIEW_HPP
#define JWT_STRING_VIEW_HPP #define JWT_STRING_VIEW_HPP
#if __cplusplus >= 201703L #if defined(__cpp_lib_string_view)
#include <string_view> #include <string_view>
@ -31,7 +31,7 @@ namespace jwt {
using string_view = std::string_view; using string_view = std::string_view;
} }
#else // __cplusplus >= 201703L #else // defined(__cpp_lib_string_view)
#include <limits> #include <limits>
#include <string> #include <string>
@ -375,6 +375,6 @@ using string_view = basic_string_view<char>;
#include "jwt/impl/string_view.ipp" #include "jwt/impl/string_view.ipp"
#endif // __cplusplus >= 201703L #endif // defined(__cpp_lib_string_view)
#endif #endif