Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
418fdbab
Unverified
Commit
418fdbab
authored
Mar 30, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
⚗
exclude iterators from KeyType
parent
69d74d4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
type_traits.hpp
include/nlohmann/detail/meta/type_traits.hpp
+5
-3
json.hpp
single_include/nlohmann/json.hpp
+5
-3
No files found.
include/nlohmann/detail/meta/type_traits.hpp
View file @
418fdbab
...
@@ -399,11 +399,13 @@ struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<std::is_con
...
@@ -399,11 +399,13 @@ struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<std::is_con
template
<
typename
BasicJsonType
,
typename
KeyType
>
template
<
typename
BasicJsonType
,
typename
KeyType
>
struct
is_key_type
struct
is_key_type
{
{
static
constexpr
bool
value
=
static
constexpr
bool
value
=
(
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
std
::
is_same
<
typename
std
::
decay
<
KeyType
>::
type
,
std
::
string_view
>::
value
||
std
::
is_same
<
typename
std
::
decay
<
KeyType
>::
type
,
std
::
string_view
>::
value
||
#endif
#endif
std
::
is_convertible
<
KeyType
,
typename
BasicJsonType
::
object_t
::
key_type
>::
value
;
std
::
is_convertible
<
KeyType
,
typename
BasicJsonType
::
object_t
::
key_type
>::
value
)
&&
!
std
::
is_same
<
KeyType
,
typename
BasicJsonType
::
iterator
>::
value
&&
!
std
::
is_same
<
KeyType
,
typename
BasicJsonType
::
const_iterator
>::
value
;
};
};
}
// namespace detail
}
// namespace detail
...
...
single_include/nlohmann/json.hpp
View file @
418fdbab
...
@@ -3776,11 +3776,13 @@ struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<std::is_con
...
@@ -3776,11 +3776,13 @@ struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<std::is_con
template
<
typename
BasicJsonType
,
typename
KeyType
>
template
<
typename
BasicJsonType
,
typename
KeyType
>
struct
is_key_type
struct
is_key_type
{
{
static
constexpr
bool
value
=
static
constexpr
bool
value
=
(
#if defined(JSON_HAS_CPP_17)
#if defined(JSON_HAS_CPP_17)
std
::
is_same
<
typename
std
::
decay
<
KeyType
>::
type
,
std
::
string_view
>::
value
||
std
::
is_same
<
typename
std
::
decay
<
KeyType
>::
type
,
std
::
string_view
>::
value
||
#endif
#endif
std
::
is_convertible
<
KeyType
,
typename
BasicJsonType
::
object_t
::
key_type
>::
value
;
std
::
is_convertible
<
KeyType
,
typename
BasicJsonType
::
object_t
::
key_type
>::
value
)
&&
!
std
::
is_same
<
KeyType
,
typename
BasicJsonType
::
iterator
>::
value
&&
!
std
::
is_same
<
KeyType
,
typename
BasicJsonType
::
const_iterator
>::
value
;
};
};
}
// namespace detail
}
// namespace detail
...
...
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