Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
d468f8c4
Commit
d468f8c4
authored
Oct 21, 2017
by
Jamie Seward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use consistent logic to determine if string_view exists
parent
59cde1ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/json.hpp
src/json.hpp
+5
-5
No files found.
src/json.hpp
View file @
d468f8c4
...
@@ -110,11 +110,11 @@ SOFTWARE.
...
@@ -110,11 +110,11 @@ SOFTWARE.
#endif
#endif
// string_view support
// string_view support
#if
defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17 == 1
#if
(defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER > 1900 && defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464
#define JSON_
USE
_STRING_VIEW
#define JSON_
HAS
_STRING_VIEW
#endif
#endif
#if defined(JSON_
USE
_STRING_VIEW)
#if defined(JSON_
HAS
_STRING_VIEW)
#include <string_view>
#include <string_view>
#endif
#endif
...
@@ -7600,7 +7600,7 @@ class basic_json
...
@@ -7600,7 +7600,7 @@ class basic_json
specified "unordered" nature of JSON objects.
specified "unordered" nature of JSON objects.
*/
*/
#if defined(JSON_
USE
_STRING_VIEW)
#if defined(JSON_
HAS
_STRING_VIEW)
// if std::string_view is to be used the object_t must
// if std::string_view is to be used the object_t must
// be declared with a transparent comparator
// be declared with a transparent comparator
// https://stackoverflow.com/questions/35525777/use-of-string-view-for-map-lookup
// https://stackoverflow.com/questions/35525777/use-of-string-view-for-map-lookup
...
@@ -9868,7 +9868,7 @@ class basic_json
...
@@ -9868,7 +9868,7 @@ class basic_json
#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015
#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015
and
not
std
::
is_same
<
ValueType
,
std
::
initializer_list
<
typename
string_t
::
value_type
>>::
value
and
not
std
::
is_same
<
ValueType
,
std
::
initializer_list
<
typename
string_t
::
value_type
>>::
value
#endif
#endif
#if
(defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER >1900 && defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464
#if
defined(JSON_HAS_STRING_VIEW)
and
not
std
::
is_same
<
ValueType
,
typename
std
::
string_view
>::
value
and
not
std
::
is_same
<
ValueType
,
typename
std
::
string_view
>::
value
#endif
#endif
,
int
>::
type
=
0
>
,
int
>::
type
=
0
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment