| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e6b607e commit 58c5d40
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2025-11-03 11:03:21 -0500. version 4.2.1 Do not edit! */ | ||
| 1 | + /* auto-generated on 2025-11-11 14:17:08 -0500. version 4.2.2 Do not edit! */ | ||
| 2 | 2 | /* including simdjson.cpp: */ | |
| 3 | 3 | /* begin file simdjson.cpp */ | |
| 4 | 4 | #define SIMDJSON_SRC_SIMDJSON_CPP | |
@@ -2752,6 +2752,8 @@ struct simdjson_result_base : protected std::pair<T, error_code> { | |||
| 2752 | 2752 | */ | |
| 2753 | 2753 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 2754 | 2754 | ||
| 2755 | + using value_type = T; | ||
| 2756 | + using error_type = error_code; | ||
| 2755 | 2757 | }; // struct simdjson_result_base | |
| 2756 | 2758 | ||
| 2757 | 2759 | } // namespace internal | |
@@ -2863,6 +2865,8 @@ struct simdjson_result : public internal::simdjson_result_base<T> { | |||
| 2863 | 2865 | */ | |
| 2864 | 2866 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 2865 | 2867 | ||
| 2868 | + using value_type = T; | ||
| 2869 | + using error_type = error_code; | ||
| 2866 | 2870 | }; // struct simdjson_result | |
| 2867 | 2871 | ||
| 2868 | 2872 | #if SIMDJSON_EXCEPTIONS | |
@@ -10105,6 +10109,9 @@ struct implementation_simdjson_result_base { | |||
| 10105 | 10109 | */ | |
| 10106 | 10110 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 10107 | 10111 | ||
| 10112 | + using value_type = T; | ||
| 10113 | + using error_type = error_code; | ||
| 10114 | + | ||
| 10108 | 10115 | protected: | |
| 10109 | 10116 | /** users should never directly access first and second. **/ | |
| 10110 | 10117 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -16600,6 +16607,9 @@ struct implementation_simdjson_result_base { | |||
| 16600 | 16607 | */ | |
| 16601 | 16608 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 16602 | 16609 | ||
| 16610 | + using value_type = T; | ||
| 16611 | + using error_type = error_code; | ||
| 16612 | + | ||
| 16603 | 16613 | protected: | |
| 16604 | 16614 | /** users should never directly access first and second. **/ | |
| 16605 | 16615 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -22950,6 +22960,9 @@ struct implementation_simdjson_result_base { | |||
| 22950 | 22960 | */ | |
| 22951 | 22961 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 22952 | 22962 | ||
| 22963 | + using value_type = T; | ||
| 22964 | + using error_type = error_code; | ||
| 22965 | + | ||
| 22953 | 22966 | protected: | |
| 22954 | 22967 | /** users should never directly access first and second. **/ | |
| 22955 | 22968 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -29457,6 +29470,9 @@ struct implementation_simdjson_result_base { | |||
| 29457 | 29470 | */ | |
| 29458 | 29471 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 29459 | 29472 | ||
| 29473 | + using value_type = T; | ||
| 29474 | + using error_type = error_code; | ||
| 29475 | + | ||
| 29460 | 29476 | protected: | |
| 29461 | 29477 | /** users should never directly access first and second. **/ | |
| 29462 | 29478 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -36323,6 +36339,9 @@ struct implementation_simdjson_result_base { | |||
| 36323 | 36339 | */ | |
| 36324 | 36340 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 36325 | 36341 | ||
| 36342 | + using value_type = T; | ||
| 36343 | + using error_type = error_code; | ||
| 36344 | + | ||
| 36326 | 36345 | protected: | |
| 36327 | 36346 | /** users should never directly access first and second. **/ | |
| 36328 | 36347 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -43011,6 +43030,9 @@ struct implementation_simdjson_result_base { | |||
| 43011 | 43030 | */ | |
| 43012 | 43031 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 43013 | 43032 | ||
| 43033 | + using value_type = T; | ||
| 43034 | + using error_type = error_code; | ||
| 43035 | + | ||
| 43014 | 43036 | protected: | |
| 43015 | 43037 | /** users should never directly access first and second. **/ | |
| 43016 | 43038 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -49145,6 +49167,9 @@ struct implementation_simdjson_result_base { | |||
| 49145 | 49167 | */ | |
| 49146 | 49168 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 49147 | 49169 | ||
| 49170 | + using value_type = T; | ||
| 49171 | + using error_type = error_code; | ||
| 49172 | + | ||
| 49148 | 49173 | protected: | |
| 49149 | 49174 | /** users should never directly access first and second. **/ | |
| 49150 | 49175 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -54871,6 +54896,9 @@ struct implementation_simdjson_result_base { | |||
| 54871 | 54896 | */ | |
| 54872 | 54897 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 54873 | 54898 | ||
| 54899 | + using value_type = T; | ||
| 54900 | + using error_type = error_code; | ||
| 54901 | + | ||
| 54874 | 54902 | protected: | |
| 54875 | 54903 | /** users should never directly access first and second. **/ | |
| 54876 | 54904 | T first{}; /** Users should never directly access 'first'. **/ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - /* auto-generated on 2025-11-03 11:03:21 -0500. version 4.2.1 Do not edit! */ | ||
| 1 | + /* auto-generated on 2025-11-11 14:17:08 -0500. version 4.2.2 Do not edit! */ | ||
| 2 | 2 | /* including simdjson.h: */ | |
| 3 | 3 | /* begin file simdjson.h */ | |
| 4 | 4 | #ifndef SIMDJSON_H | |
@@ -2513,7 +2513,7 @@ namespace std { | |||
| 2513 | 2513 | #define SIMDJSON_SIMDJSON_VERSION_H | |
| 2514 | 2514 | ||
| 2515 | 2515 | /** The version of simdjson being used (major.minor.revision) */ | |
| 2516 | - #define SIMDJSON_VERSION "4.2.1" | ||
| 2516 | + #define SIMDJSON_VERSION "4.2.2" | ||
| 2517 | 2517 | ||
| 2518 | 2518 | namespace simdjson { | |
| 2519 | 2519 | enum { | |
@@ -2528,7 +2528,7 @@ enum { | |||
| 2528 | 2528 | /** | |
| 2529 | 2529 | * The revision (major.minor.REVISION) of simdjson being used. | |
| 2530 | 2530 | */ | |
| 2531 | - SIMDJSON_VERSION_REVISION = 1 | ||
| 2531 | + SIMDJSON_VERSION_REVISION = 2 | ||
| 2532 | 2532 | }; | |
| 2533 | 2533 | } // namespace simdjson | |
| 2534 | 2534 | ||
@@ -2815,6 +2815,8 @@ struct simdjson_result_base : protected std::pair<T, error_code> { | |||
| 2815 | 2815 | */ | |
| 2816 | 2816 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 2817 | 2817 | ||
| 2818 | + using value_type = T; | ||
| 2819 | + using error_type = error_code; | ||
| 2818 | 2820 | }; // struct simdjson_result_base | |
| 2819 | 2821 | ||
| 2820 | 2822 | } // namespace internal | |
@@ -2926,6 +2928,8 @@ struct simdjson_result : public internal::simdjson_result_base<T> { | |||
| 2926 | 2928 | */ | |
| 2927 | 2929 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 2928 | 2930 | ||
| 2931 | + using value_type = T; | ||
| 2932 | + using error_type = error_code; | ||
| 2929 | 2933 | }; // struct simdjson_result | |
| 2930 | 2934 | ||
| 2931 | 2935 | #if SIMDJSON_EXCEPTIONS | |
@@ -4165,6 +4169,19 @@ struct padded_string final { | |||
| 4165 | 4169 | **/ | |
| 4166 | 4170 | inline static simdjson_result<padded_string> load(std::string_view path) noexcept; | |
| 4167 | 4171 | ||
| 4172 | + #if defined(_WIN32) && SIMDJSON_CPLUSPLUS17 | ||
| 4173 | + /** | ||
| 4174 | + * This function accepts a wide string path (UTF-16) and converts it to | ||
| 4175 | + * UTF-8 before loading the file. This allows windows users to work | ||
| 4176 | + * with unicode file paths without manually converting the paths everytime. | ||
| 4177 | + * | ||
| 4178 | + * @return IO_ERROR on error, including conversion failures. | ||
| 4179 | + * | ||
| 4180 | + * @param path the path to the file as a wide string. | ||
| 4181 | + **/ | ||
| 4182 | + inline static simdjson_result<padded_string> load(std::wstring_view path) noexcept; | ||
| 4183 | + #endif | ||
| 4184 | + | ||
| 4168 | 4185 | private: | |
| 4169 | 4186 | padded_string &operator=(const padded_string &o) = delete; | |
| 4170 | 4187 | padded_string(const padded_string &o) = delete; | |
@@ -4476,6 +4493,7 @@ inline padded_string_view pad_with_reserve(std::string& s) noexcept { | |||
| 4476 | 4493 | /* end file simdjson/padded_string_view-inl.h */ | |
| 4477 | 4494 | ||
| 4478 | 4495 | #include <climits> | |
| 4496 | + #include <cwchar> | ||
| 4479 | 4497 | ||
| 4480 | 4498 | namespace simdjson { | |
| 4481 | 4499 | namespace internal { | |
@@ -4653,6 +4671,62 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen | |||
| 4653 | 4671 | return s; | |
| 4654 | 4672 | } | |
| 4655 | 4673 | ||
| 4674 | + #if defined(_WIN32) && SIMDJSON_CPLUSPLUS17 | ||
| 4675 | + inline simdjson_result<padded_string> padded_string::load(std::wstring_view filename) noexcept { | ||
| 4676 | + // Open the file using the wide characters | ||
| 4677 | + SIMDJSON_PUSH_DISABLE_WARNINGS | ||
| 4678 | + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe | ||
| 4679 | + std::FILE *fp = _wfopen(filename.data(), L"rb"); | ||
| 4680 | + SIMDJSON_POP_DISABLE_WARNINGS | ||
| 4681 | + | ||
| 4682 | + if (fp == nullptr) { | ||
| 4683 | + return IO_ERROR; | ||
| 4684 | + } | ||
| 4685 | + | ||
| 4686 | + // Get the file size | ||
| 4687 | + int ret; | ||
| 4688 | + #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS | ||
| 4689 | + ret = _fseeki64(fp, 0, SEEK_END); | ||
| 4690 | + #else | ||
| 4691 | + ret = std::fseek(fp, 0, SEEK_END); | ||
| 4692 | + #endif // _WIN64 | ||
| 4693 | + if(ret < 0) { | ||
| 4694 | + std::fclose(fp); | ||
| 4695 | + return IO_ERROR; | ||
| 4696 | + } | ||
| 4697 | + #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS | ||
| 4698 | + __int64 llen = _ftelli64(fp); | ||
| 4699 | + if(llen == -1L) { | ||
| 4700 | + std::fclose(fp); | ||
| 4701 | + return IO_ERROR; | ||
| 4702 | + } | ||
| 4703 | + #else | ||
| 4704 | + long llen = std::ftell(fp); | ||
| 4705 | + if((llen < 0) || (llen == LONG_MAX)) { | ||
| 4706 | + std::fclose(fp); | ||
| 4707 | + return IO_ERROR; | ||
| 4708 | + } | ||
| 4709 | + #endif | ||
| 4710 | + | ||
| 4711 | + // Allocate the padded_string | ||
| 4712 | + size_t len = static_cast<size_t>(llen); | ||
| 4713 | + padded_string s(len); | ||
| 4714 | + if (s.data() == nullptr) { | ||
| 4715 | + std::fclose(fp); | ||
| 4716 | + return MEMALLOC; | ||
| 4717 | + } | ||
| 4718 | + | ||
| 4719 | + // Read the padded_string | ||
| 4720 | + std::rewind(fp); | ||
| 4721 | + size_t bytes_read = std::fread(s.data(), 1, len, fp); | ||
| 4722 | + if (std::fclose(fp) != 0 || bytes_read != len) { | ||
| 4723 | + return IO_ERROR; | ||
| 4724 | + } | ||
| 4725 | + | ||
| 4726 | + return s; | ||
| 4727 | + } | ||
| 4728 | + #endif | ||
| 4729 | + | ||
| 4656 | 4730 | } // namespace simdjson | |
| 4657 | 4731 | ||
| 4658 | 4732 | inline simdjson::padded_string operator ""_padded(const char *str, size_t len) { | |
@@ -12996,6 +13070,9 @@ struct implementation_simdjson_result_base { | |||
| 12996 | 13070 | */ | |
| 12997 | 13071 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 12998 | 13072 | ||
| 13073 | + using value_type = T; | ||
| 13074 | + using error_type = error_code; | ||
| 13075 | + | ||
| 12999 | 13076 | protected: | |
| 13000 | 13077 | /** users should never directly access first and second. **/ | |
| 13001 | 13078 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -15191,6 +15268,9 @@ struct implementation_simdjson_result_base { | |||
| 15191 | 15268 | */ | |
| 15192 | 15269 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 15193 | 15270 | ||
| 15271 | + using value_type = T; | ||
| 15272 | + using error_type = error_code; | ||
| 15273 | + | ||
| 15194 | 15274 | protected: | |
| 15195 | 15275 | /** users should never directly access first and second. **/ | |
| 15196 | 15276 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -17885,6 +17965,9 @@ struct implementation_simdjson_result_base { | |||
| 17885 | 17965 | */ | |
| 17886 | 17966 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 17887 | 17967 | ||
| 17968 | + using value_type = T; | ||
| 17969 | + using error_type = error_code; | ||
| 17970 | + | ||
| 17888 | 17971 | protected: | |
| 17889 | 17972 | /** users should never directly access first and second. **/ | |
| 17890 | 17973 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -20579,6 +20662,9 @@ struct implementation_simdjson_result_base { | |||
| 20579 | 20662 | */ | |
| 20580 | 20663 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 20581 | 20664 | ||
| 20665 | + using value_type = T; | ||
| 20666 | + using error_type = error_code; | ||
| 20667 | + | ||
| 20582 | 20668 | protected: | |
| 20583 | 20669 | /** users should never directly access first and second. **/ | |
| 20584 | 20670 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -23388,6 +23474,9 @@ struct implementation_simdjson_result_base { | |||
| 23388 | 23474 | */ | |
| 23389 | 23475 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 23390 | 23476 | ||
| 23477 | + using value_type = T; | ||
| 23478 | + using error_type = error_code; | ||
| 23479 | + | ||
| 23391 | 23480 | protected: | |
| 23392 | 23481 | /** users should never directly access first and second. **/ | |
| 23393 | 23482 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -26513,6 +26602,9 @@ struct implementation_simdjson_result_base { | |||
| 26513 | 26602 | */ | |
| 26514 | 26603 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 26515 | 26604 | ||
| 26605 | + using value_type = T; | ||
| 26606 | + using error_type = error_code; | ||
| 26607 | + | ||
| 26516 | 26608 | protected: | |
| 26517 | 26609 | /** users should never directly access first and second. **/ | |
| 26518 | 26610 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -29115,6 +29207,9 @@ struct implementation_simdjson_result_base { | |||
| 29115 | 29207 | */ | |
| 29116 | 29208 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 29117 | 29209 | ||
| 29210 | + using value_type = T; | ||
| 29211 | + using error_type = error_code; | ||
| 29212 | + | ||
| 29118 | 29213 | protected: | |
| 29119 | 29214 | /** users should never directly access first and second. **/ | |
| 29120 | 29215 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -31730,6 +31825,9 @@ struct implementation_simdjson_result_base { | |||
| 31730 | 31825 | */ | |
| 31731 | 31826 | simdjson_inline T&& value_unsafe() && noexcept; | |
| 31732 | 31827 | ||
| 31828 | + using value_type = T; | ||
| 31829 | + using error_type = error_code; | ||
| 31830 | + | ||
| 31733 | 31831 | protected: | |
| 31734 | 31832 | /** users should never directly access first and second. **/ | |
| 31735 | 31833 | T first{}; /** Users should never directly access 'first'. **/ | |
@@ -46859,7 +46957,7 @@ template <std::ranges::range R> | |||
| 46859 | 46957 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 46860 | 46958 | auto it = std::ranges::begin(range); | |
| 46861 | 46959 | auto end = std::ranges::end(range); | |
| 46862 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 46960 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 46863 | 46961 | start_object(); | |
| 46864 | 46962 | ||
| 46865 | 46963 | if (it == end) { | |
@@ -61324,7 +61422,7 @@ template <std::ranges::range R> | |||
| 61324 | 61422 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 61325 | 61423 | auto it = std::ranges::begin(range); | |
| 61326 | 61424 | auto end = std::ranges::end(range); | |
| 61327 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 61425 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 61328 | 61426 | start_object(); | |
| 61329 | 61427 | ||
| 61330 | 61428 | if (it == end) { | |
@@ -76288,7 +76386,7 @@ template <std::ranges::range R> | |||
| 76288 | 76386 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 76289 | 76387 | auto it = std::ranges::begin(range); | |
| 76290 | 76388 | auto end = std::ranges::end(range); | |
| 76291 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 76389 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 76292 | 76390 | start_object(); | |
| 76293 | 76391 | ||
| 76294 | 76392 | if (it == end) { | |
@@ -91252,7 +91350,7 @@ template <std::ranges::range R> | |||
| 91252 | 91350 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 91253 | 91351 | auto it = std::ranges::begin(range); | |
| 91254 | 91352 | auto end = std::ranges::end(range); | |
| 91255 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 91353 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 91256 | 91354 | start_object(); | |
| 91257 | 91355 | ||
| 91258 | 91356 | if (it == end) { | |
@@ -106331,7 +106429,7 @@ template <std::ranges::range R> | |||
| 106331 | 106429 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 106332 | 106430 | auto it = std::ranges::begin(range); | |
| 106333 | 106431 | auto end = std::ranges::end(range); | |
| 106334 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 106432 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 106335 | 106433 | start_object(); | |
| 106336 | 106434 | ||
| 106337 | 106435 | if (it == end) { | |
@@ -121726,7 +121824,7 @@ template <std::ranges::range R> | |||
| 121726 | 121824 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 121727 | 121825 | auto it = std::ranges::begin(range); | |
| 121728 | 121826 | auto end = std::ranges::end(range); | |
| 121729 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 121827 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 121730 | 121828 | start_object(); | |
| 121731 | 121829 | ||
| 121732 | 121830 | if (it == end) { | |
@@ -136598,7 +136696,7 @@ template <std::ranges::range R> | |||
| 136598 | 136696 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 136599 | 136697 | auto it = std::ranges::begin(range); | |
| 136600 | 136698 | auto end = std::ranges::end(range); | |
| 136601 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 136699 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 136602 | 136700 | start_object(); | |
| 136603 | 136701 | ||
| 136604 | 136702 | if (it == end) { | |
@@ -151483,7 +151581,7 @@ template <std::ranges::range R> | |||
| 151483 | 151581 | simdjson_inline void string_builder::append(const R &range) noexcept { | |
| 151484 | 151582 | auto it = std::ranges::begin(range); | |
| 151485 | 151583 | auto end = std::ranges::end(range); | |
| 151486 | - if constexpr (concepts::is_pair<typename R::value_type>) { | ||
| 151584 | + if constexpr (concepts::is_pair<std::ranges::range_value_t<R>>) { | ||
| 151487 | 151585 | start_object(); | |
| 151488 | 151586 | ||
| 151489 | 151587 | if (it == end) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments