Repository navigation
Trim <functional>, <sstream>, and unused <map> from thin wrapper and validator headers - #135
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
…validator headers
clockblocker
added a commit
that referenced
this pull request
Nov 28, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
clockblocker
added a commit
that referenced
this pull request
Nov 29, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
clockblocker
added a commit
that referenced
this pull request
Nov 29, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
clockblocker
added a commit
that referenced
this pull request
Nov 29, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
clockblocker
added a commit
that referenced
this pull request
Nov 29, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
clockblocker
added a commit
that referenced
this pull request
Nov 29, 2026
…#120) Stacked cleanly on wave4/error-kind (4A) and Wave 1A (#135). Polish from audit #16: - Preserve Wave 1A <sstream> elimination across PatternValidator.hpp, comparisons.hpp, AnyOf.hpp, OneOf.hpp, and internal/cpp20/Result.hpp. - Move builtin_error_code_str, parse_builtin_error_code, compose_size_code, and compose_code_points_code out-of-line into src/rfl/internal/Error.cpp (wired into src/reflectcpp.cpp with RFL_API declarations in Error.hpp) to trim Error.hpp compile-time weight. - Fix P0 missing catch (...) in MapReader.hpp (both validator and non-validator key paths) and harden Validator.hpp and AllOf.hpp noexcept boundaries with const std::exception& and catch (...). - Guard constant nullptr V::code in validator_code.hpp with if constexpr to avoid GCC 13 -Werror=nonnull. - Add ASan+UBSan unit test coverage for non-std::exception throws in Validator, AllOf, and MapReader.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes unnecessary
<functional>,<sstream>, and<map>includes from the thin wrapper and validator headers. Zero public API changes; validation error messages remain identical.Key details
<functional>frominternal/cpp20/Result.hpp,Validator.hpp, andLiteral.hpp(avoids pulling<unordered_map>on libstdc++).Result::transform_errorcallsfdirectly instead of viastd::invoke(matching its existingstatic_assert), andstd::hashspecializations rely on the declarations already provided by<string>/<memory>/<variant>/<vector>(matchingRef.hpp/Box.hpp).<sstream>fromcomparisons.hpp,AnyOf.hpp,OneOf.hpp, andPatternValidator.hppin favor ofstd::string/std::to_string, usingstd::snprintf("%g"/"%Lg")for floats incomparisons.hppso floating-point formatting matchesstd::stringstream.<map>fromSize.hpp.Compile-time impact (
-fsyntax-only, C++20)g++-16(libstdc++)rfl/Result.hpprfl/Validator.hpp+rfl/comparisons.hpprfl/Size.hppAI auhtored