chore_disable_deprecation_ftbfs_in_simdjson_header.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Charles Kerr <[email protected]>
  3. Date: Mon, 4 Nov 2024 17:40:17 -0600
  4. Subject: chore: disable deprecation ftbfs in simdjson header
  5. Without this patch, building with simdjson fails with
  6. > error: identifier '_padded' preceded by whitespace in a literal operator
  7. > declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
  8. This patch can be removed once this is fixed upstream in simdjson.
  9. diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
  10. index ddb6f2e4e0a6edd23d5e16db07bc4bb18974d4aa..533dfea4d5fd3c7f6f7fdf0ea525479b11634fd3 100644
  11. --- a/deps/simdjson/simdjson.h
  12. +++ b/deps/simdjson/simdjson.h
  13. @@ -3650,12 +3650,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
  14. } // namespace simdjson
  15. +#pragma clang diagnostic push
  16. +#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
  17. +
  18. // This is deliberately outside of simdjson so that people get it without having to use the namespace
  19. inline simdjson::padded_string operator "" _padded(const char *str, size_t len);
  20. #ifdef __cpp_char8_t
  21. inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t len);
  22. #endif
  23. +#pragma clang diagnostic pop
  24. +
  25. namespace simdjson {
  26. namespace internal {
  27. @@ -4033,6 +4038,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
  28. } // namespace simdjson
  29. +#pragma clang diagnostic push
  30. +#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
  31. +
  32. inline simdjson::padded_string operator "" _padded(const char *str, size_t len) {
  33. return simdjson::padded_string(str, len);
  34. }
  35. @@ -4041,6 +4049,8 @@ inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t le
  36. return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
  37. }
  38. #endif
  39. +#pragma clang diagnostic pop
  40. +
  41. #endif // SIMDJSON_PADDED_STRING_INL_H
  42. /* end file simdjson/padded_string-inl.h */
  43. /* skipped duplicate #include "simdjson/padded_string_view.h" */
  44. @@ -118280,4 +118290,4 @@ namespace simdjson {
  45. /* end file simdjson/ondemand.h */
  46. #endif // SIMDJSON_H
  47. -/* end file simdjson.h */
  48. +/* end file simdjson.h */
  49. \ No newline at end of file