🏁 removed __builtin_expect for MSVC

parent d025b6aa
...@@ -91,8 +91,13 @@ SOFTWARE. ...@@ -91,8 +91,13 @@ SOFTWARE.
#endif #endif
// manual branch prediction // manual branch prediction
#define JSON_LIKELY(x) __builtin_expect(!!(x), 1) #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) #define JSON_LIKELY(x) __builtin_expect(!!(x), 1)
#define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
#define JSON_LIKELY(x) x
#define JSON_UNLIKELY(x) x
#endif
/*! /*!
@brief namespace for Niels Lohmann @brief namespace for Niels Lohmann
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment