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
0e3a0b73
Unverified
Commit
0e3a0b73
authored
Dec 05, 2017
by
Niels Lohmann
Committed by
GitHub
Dec 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #854 from theodelrieu/fix/force_msvc_stacktrace
to/from_json: add a MSVC-specific static_assert to force a stacktrace
parents
f4c01601
c9a02cbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
json.hpp
src/json.hpp
+13
-0
No files found.
src/json.hpp
View file @
0e3a0b73
...
...
@@ -1351,6 +1351,13 @@ struct to_json_fn
{
static_assert
(
sizeof
(
BasicJsonType
)
==
0
,
"could not find to_json() method in T's namespace"
);
#ifdef _MSC_VER
// Visual Studio does not show a stacktrace for the above assert.
using
decayed
=
uncvref_t
<
T
>
;
static_assert
(
sizeof
(
typename
decayed
::
force_msvc_stacktrace
)
==
0
,
"forcing msvc stacktrace to show which T we're talking about."
);
#endif
}
public
:
...
...
@@ -1378,6 +1385,12 @@ struct from_json_fn
{
static_assert
(
sizeof
(
BasicJsonType
)
==
0
,
"could not find from_json() method in T's namespace"
);
#ifdef _MSC_VER
// Visual Studio does not show a stacktrace for the above assert.
using
decayed
=
uncvref_t
<
T
>
;
static_assert
(
sizeof
(
typename
decayed
::
force_msvc_stacktrace
)
==
0
,
"forcing msvc stacktrace to show which T we're talking about."
);
#endif
}
public
:
...
...
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