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
5c1a5bc9
Unverified
Commit
5c1a5bc9
authored
Dec 16, 2020
by
Niels Lohmann
Committed by
GitHub
Dec 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2534 from nlohmann/clarify_license
Clarify license of is_complete_type implementation
parents
45810082
94d177e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
include/nlohmann/detail/meta/type_traits.hpp
include/nlohmann/detail/meta/type_traits.hpp
+3
-2
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+3
-2
No files found.
include/nlohmann/detail/meta/type_traits.hpp
View file @
5c1a5bc9
...
@@ -168,7 +168,9 @@ struct is_iterator_traits<iterator_traits<T>>
...
@@ -168,7 +168,9 @@ struct is_iterator_traits<iterator_traits<T>>
is_detected
<
reference_t
,
traits
>::
value
;
is_detected
<
reference_t
,
traits
>::
value
;
};
};
// source: https://stackoverflow.com/a/37193089/4116453
// The following implementation of is_complete_type is taken from
// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/
// and is written by Xiang Fan who agreed to using it in this library.
template
<
typename
T
,
typename
=
void
>
template
<
typename
T
,
typename
=
void
>
struct
is_complete_type
:
std
::
false_type
{};
struct
is_complete_type
:
std
::
false_type
{};
...
@@ -186,7 +188,6 @@ struct is_compatible_object_type_impl <
...
@@ -186,7 +188,6 @@ struct is_compatible_object_type_impl <
enable_if_t
<
is_detected
<
mapped_type_t
,
CompatibleObjectType
>::
value
&&
enable_if_t
<
is_detected
<
mapped_type_t
,
CompatibleObjectType
>::
value
&&
is_detected
<
key_type_t
,
CompatibleObjectType
>::
value
>>
is_detected
<
key_type_t
,
CompatibleObjectType
>::
value
>>
{
{
using
object_t
=
typename
BasicJsonType
::
object_t
;
using
object_t
=
typename
BasicJsonType
::
object_t
;
// macOS's is_constructible does not play well with nonesuch...
// macOS's is_constructible does not play well with nonesuch...
...
...
single_include/nlohmann/json.hpp
View file @
5c1a5bc9
...
@@ -3174,7 +3174,9 @@ struct is_iterator_traits<iterator_traits<T>>
...
@@ -3174,7 +3174,9 @@ struct is_iterator_traits<iterator_traits<T>>
is_detected
<
reference_t
,
traits
>::
value
;
is_detected
<
reference_t
,
traits
>::
value
;
};
};
// source: https://stackoverflow.com/a/37193089/4116453
// The following implementation of is_complete_type is taken from
// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/
// and is written by Xiang Fan who agreed to using it in this library.
template
<
typename
T
,
typename
=
void
>
template
<
typename
T
,
typename
=
void
>
struct
is_complete_type
:
std
::
false_type
{};
struct
is_complete_type
:
std
::
false_type
{};
...
@@ -3192,7 +3194,6 @@ struct is_compatible_object_type_impl <
...
@@ -3192,7 +3194,6 @@ struct is_compatible_object_type_impl <
enable_if_t
<
is_detected
<
mapped_type_t
,
CompatibleObjectType
>::
value
&&
enable_if_t
<
is_detected
<
mapped_type_t
,
CompatibleObjectType
>::
value
&&
is_detected
<
key_type_t
,
CompatibleObjectType
>::
value
>>
is_detected
<
key_type_t
,
CompatibleObjectType
>::
value
>>
{
{
using
object_t
=
typename
BasicJsonType
::
object_t
;
using
object_t
=
typename
BasicJsonType
::
object_t
;
// macOS's is_constructible does not play well with nonesuch...
// macOS's is_constructible does not play well with nonesuch...
...
...
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