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
f7131715
Unverified
Commit
f7131715
authored
Jan 30, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/nlohmann/json
into develop
parents
ce273af9
ae235139
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
develop/detail/macro_scope.hpp
develop/detail/macro_scope.hpp
+14
-0
src/json.hpp
src/json.hpp
+14
-0
No files found.
develop/detail/macro_scope.hpp
View file @
f7131715
...
@@ -46,6 +46,20 @@
...
@@ -46,6 +46,20 @@
#define JSON_CATCH(exception) if(false)
#define JSON_CATCH(exception) if(false)
#endif
#endif
// override exception macros
#if defined(JSON_THROW_USER)
#undef JSON_THROW
#define JSON_THROW JSON_THROW_USER
#endif
#if defined(JSON_TRY_USER)
#undef JSON_TRY
#define JSON_TRY JSON_TRY_USER
#endif
#if defined(JSON_CATCH_USER)
#undef JSON_CATCH
#define JSON_CATCH JSON_CATCH_USER
#endif
// manual branch prediction
// manual branch prediction
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
...
...
src/json.hpp
View file @
f7131715
...
@@ -156,6 +156,20 @@ using json = basic_json<>;
...
@@ -156,6 +156,20 @@ using json = basic_json<>;
#define JSON_CATCH(exception) if(false)
#define JSON_CATCH(exception) if(false)
#endif
#endif
// override exception macros
#if defined(JSON_THROW_USER)
#undef JSON_THROW
#define JSON_THROW JSON_THROW_USER
#endif
#if defined(JSON_TRY_USER)
#undef JSON_TRY
#define JSON_TRY JSON_TRY_USER
#endif
#if defined(JSON_CATCH_USER)
#undef JSON_CATCH
#define JSON_CATCH JSON_CATCH_USER
#endif
// manual branch prediction
// manual branch prediction
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
...
...
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