File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,19 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
77
77
#define unlikely (x ) x
78
78
#endif
79
79
80
- #include < CppCoreCheck\Warnings.h>
81
80
#define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma (warning( push ))
82
81
#define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma (warning( push, 0 ))
83
82
#define SIMDJSON_DISABLE_VS_WARNING (WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER ))
84
83
// Get rid of Intellisense-only warnings (Code Analysis)
84
+ // Though __has_include is C++17, it looks like it is supported in Visual Studio 2017 or better.
85
+ // We are probably not supporting earlier version of Visual Studio in any case.
86
+ #if __has_include (<CppCoreCheck\Warnings.h>)
87
+ #include <CppCoreCheck\Warnings.h>
85
88
#define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING (ALL_CPPCORECHECK_WARNINGS)
89
+ #else
90
+ #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
91
+ #endif
92
+
86
93
#define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING (4996 )
87
94
#define SIMDJSON_POP_DISABLE_WARNINGS __pragma (warning( pop ))
88
95
You can’t perform that action at this time.
0 commit comments