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
c9a02cbc
Unverified
Commit
c9a02cbc
authored
Dec 05, 2017
by
Théo DELRIEU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
to/from_json: add a MSVC-specific static_assert to force a stacktrace
parent
f4c01601
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/json.hpp
src/json.hpp
+13
-0
No files found.
src/json.hpp
View file @
c9a02cbc
...
...
@@ -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