@@ -8,13 +8,16 @@ Without this patch, building with simdjson fails with
88> error: identifier '_padded' preceded by whitespace in a literal operator
99> declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
1010
11+ and
12+ > error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
13+
1114This patch can be removed once this is fixed upstream in simdjson.
1215
1316diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
14- index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d844f15f42 100644
17+ index a8bd86b28acc16cb04c193a1afbeb8171b314107..e200835e3ae6042f5af62f7ea3e082c677a9d0cf 100644
1518--- a/deps/simdjson/simdjson.h
1619+++ b/deps/simdjson/simdjson.h
17- @@ -3899 ,12 +3899 ,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
20+ @@ -4160 ,12 +4160 ,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
1821
1922 } // namespace simdjson
2023
@@ -32,7 +35,7 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
3235 namespace simdjson {
3336 namespace internal {
3437
35- @@ -4304 ,6 +4309 ,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
38+ @@ -4617 ,6 +4622 ,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
3639
3740 } // namespace simdjson
3841
@@ -42,7 +45,7 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
4245 inline simdjson::padded_string operator ""_padded(const char *str, size_t len) {
4346 return simdjson::padded_string(str, len);
4447 }
45- @@ -4312 ,6 +4320 ,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
48+ @@ -4625 ,6 +4633 ,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
4649 return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
4750 }
4851 #endif
@@ -51,3 +54,37 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
5154 #endif // SIMDJSON_PADDED_STRING_INL_H
5255 /* end file simdjson/padded_string-inl.h */
5356 /* skipped duplicate #include "simdjson/padded_string_view.h" */
57+ @@ -43655,12 +43665,16 @@ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::
58+ return parser_instance;
59+ }
60+
61+ + #pragma clang diagnostic push
62+ + #pragma clang diagnostic ignored "-Wexit-time-destructors"
63+ +
64+ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::get_threadlocal_parser_if_exists() {
65+ // @the-moisrex points out that this could be implemented with std::optional (C++17).
66+ thread_local std::unique_ptr<ondemand::parser> parser_instance = nullptr;
67+ return parser_instance;
68+ }
69+
70+ + #pragma clang diagnostic pop
71+
72+ } // namespace ondemand
73+ } // namespace arm64
74+ @@ -56961,12 +56975,16 @@ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::
75+ return parser_instance;
76+ }
77+
78+ + #pragma clang diagnostic push
79+ + #pragma clang diagnostic ignored "-Wexit-time-destructors"
80+ +
81+ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::get_threadlocal_parser_if_exists() {
82+ // @the-moisrex points out that this could be implemented with std::optional (C++17).
83+ thread_local std::unique_ptr<ondemand::parser> parser_instance = nullptr;
84+ return parser_instance;
85+ }
86+
87+ + #pragma clang diagnostic pop
88+
89+ } // namespace ondemand
90+ } // namespace fallback
0 commit comments