Compare commits

...

1 Commits

Author SHA1 Message Date
Daniel Lemire 5be57348c4 adding global variable simdjson_development_checks_enabled 2026-04-07 15:47:06 -04:00
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -379,6 +379,8 @@ tracking explicitly potential programming mistakes. Thus you should not relying
size (`sizeof`) of our data structures to be constant: they may change depending on the
compiler settings.
When `SIMDJSON_DEVELOPMENT_CHECKS` is set at compile time, the global variable `simdjson_development_checks_enabled` is defined as true. It is false otherwise.
Once your code has been tested, you can then run it in
Release mode: under Visual Studio, it means having the `_DEBUG` macro undefined, and, for other
compilers, it means setting `__OPTIMIZE__` to a positive integer. You can also forcefully
+9
View File
@@ -297,6 +297,15 @@ namespace std {
#endif // _MSC_VER
#endif // SIMDJSON_DEVELOPMENT_CHECKS
// Prevent ODR violations for the simdjson_development_checks_enabled variable.
#if SIMDJSON_DEVELOPMENT_CHECKS
extern const bool simdjson_development_checks_enabled = true;
#else
extern const bool simdjson_development_checks_enabled = false;
#endif // SIMDJSON_DEVELOPMENT_CHECKS
// The SIMDJSON_CHECK_EOF macro is a feature flag for the "don't require padding"
// feature.