Merge branch 'develop' of https://github.com/nlohmann/json into develop
This commit is contained in:
commit
f7131715b1
2 changed files with 28 additions and 0 deletions
|
@ -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)
|
||||||
|
|
14
src/json.hpp
14
src/json.hpp
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue