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
e36593e9
Unverified
Commit
e36593e9
authored
Jan 20, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔨
trying code from
https://godbolt.org/z/-tLO1K
parent
d359fd3a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
include/nlohmann/detail/macro_scope.hpp
include/nlohmann/detail/macro_scope.hpp
+8
-4
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+8
-4
No files found.
include/nlohmann/detail/macro_scope.hpp
View file @
e36593e9
...
...
@@ -38,10 +38,14 @@
#endif
// allow for portable nodiscard warnings
#if defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
#if defined(__has_cpp_attribute)
#if __has_cpp_attribute(nodiscard)
#define JSON_NODISCARD [[nodiscard]]
#elif defined(__has_cpp_attribute) &&
__has_cpp_attribute(gnu::warn_unused_result)
#elif
__has_cpp_attribute(gnu::warn_unused_result)
#define JSON_NODISCARD [[gnu::warn_unused_result]]
#else
#define JSON_NODISCARD
#endif
#else
#define JSON_NODISCARD
#endif
...
...
single_include/nlohmann/json.hpp
View file @
e36593e9
...
...
@@ -153,10 +153,14 @@ using json = basic_json<>;
#endif
// allow for portable nodiscard warnings
#if defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
#if defined(__has_cpp_attribute)
#if __has_cpp_attribute(nodiscard)
#define JSON_NODISCARD [[nodiscard]]
#elif defined(__has_cpp_attribute) &&
__has_cpp_attribute(gnu::warn_unused_result)
#elif
__has_cpp_attribute(gnu::warn_unused_result)
#define JSON_NODISCARD [[gnu::warn_unused_result]]
#else
#define JSON_NODISCARD
#endif
#else
#define JSON_NODISCARD
#endif
...
...
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