Repository navigation
Upstream PR Queue (sorted by mergeability score) - #191
Draft
clockblocker wants to merge 36 commits into
Draft
clockblocker wants to merge 36 commits into
clockblocker wants to merge 36 commits into
Conversation
This was referenced Nov 29, 2026
clockblocker
force-pushed
the
upstream-queue
branch
2 times, most recently
from
November 29, 2026 15:25
b974204 to
fcf8d4e
Compare
…name_str_view Fixes a v0.26.1 regression (433795b) where `rfl::internal::get_type_name_str_view<T>()` returned a `std::string_view` pointing into a destroyed temporary `StringLiteral<N>`, failing constant evaluation on every call. Dispatches directly to `cpp20::get_type_name_str_view<T>()` and `cpp26::get_type_name_str_view<T>()`. Upstream PR: munich-data-engineering#804 (176/176 CI green) Downstream receipts: - NVIDIA/cuda-quantum calls `rfl::internal::get_type_name_str_view<T>()` in a constexpr context: https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Reflection.h#L27-L31 - munich-data-engineering/sqlgen carries its own copy to avoid the dangling view: https://github.com/munich-data-engineering/sqlgen/blob/265b0a174b661c5905b874f97b064aecb4cded70/include/sqlgen/internal/get_type_name.hpp#L13-L44
Replaces the chained `.and_then(...).or_else(...)` recursion in `rfl::OneOf::validate_impl` with an explicit check so each branch is evaluated exactly once. Previously: 1. When any non-last branch passed and a later branch failed, the inner error fell into the outer `.or_else()` handler, rejecting valid values (even printing "Expected exactly 1 out of 2 validations to pass, but 1 of them did"). 2. When multiple branches passed simultaneously, the terminal failure fell into the outer `.or_else()`, appending to a moved-from `_errors` vector and wrongly accepting invalid inputs. 3. Passing `std::move(_errors)` into `.and_then()` and then mutating `_errors` in `.or_else()` caused use-after-move and O(2^N) re-evaluation. Also removes a stray inline review comment left in `OneOf.hpp` and adds regression tests for first-branch match, multi-branch overlap, and zero-branch failure in `tests/json/test_one_of.cpp`.
…o signed integers In yyjson, non-negative integers in [0, UINT64_MAX] have subtype `YYJSON_SUBTYPE_UINT` (`uni.u64`), yet `yyjson_is_int()` matches both `UINT` and `SINT` and `yyjson_get_sint()` reads `uni.i64` directly. Values in `(INT64_MAX, UINT64_MAX]` therefore read an inactive union member and silently wrapped to negative `int64_t` (e.g. `UINT64_MAX` became `-1`), bypassing the narrow integer range check added in munich-data-engineering#746 and corrupting `rfl::Generic`. Check `yyjson_is_uint()` first with an unsigned upper-bound comparison against `std::numeric_limits<Target>::max()` before checking `yyjson_is_sint()`. Follow-up to: munich-data-engineering#746 Downstream context: mixed signed/unsigned 64-bit JSON schemas in - hudson-trading/slang-server: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/Config.h#L59-L60 - openmoq/moqx: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/src/config/loader/ParsedConfig.h
…nich-data-engineering#375) Alternatives of an `rfl::TaggedUnion` carry mutually exclusive discriminator tags, so a valid document can match at most one branch. Marks the internal `schema::Type::AnyOf` node with a defaulted `mutually_exclusive_ = false` flag and emits `oneOf` in `src/rfl/json/to_schema.cpp` for `rfl::TaggedUnion` (including under `rfl::AddTagsToVariants`). Untagged `rfl::Variant`, `std::variant`, `std::optional`, Avro, and Cap'n Proto schemas remain unchanged. Refs: munich-data-engineering#375 (Maintainer: "you are right that oneOf is more accurate. We should change it.") Downstream receipt: - games-on-whales/wolf defines `RunnerTypes = rfl::TaggedUnion<"type", AppCMD, AppDocker>` (https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/events/events.hpp#L46) and its committed OpenAPI 3.1 spec currently emits inaccurate `anyOf` at 4 sites: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/docs/modules/dev/partials/spec.json#L939-L948
… -Wunused-parameter warnings Cleans compiler warnings across 14 public headers (+22/-18 LOC) using unnamed unused parameters (matching munich-data-engineering#582) with zero API or behavioral changes so consumers building with strict flags (`-Wall -Wextra -Werror -pedantic -Wconversion -Wsign-conversion -Wextra-semi`) get clean builds. Upstream PR: munich-data-engineering#803 Downstream receipts: - hudson-trading/slang-server suppresses reflect-cpp warnings in 4 places: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/CMakeLists.txt#L317-L321 - games-on-whales/wolf wraps FetchContent(reflect-cpp) with `add_compile_options(-w)`: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/CMakeLists.txt#L38-L45 - munich-data-engineering/sqlgen, openmoq/moqx, and FANUC-CORPORATION/fanuc_driver all compile with `-Wall -Wextra -Wpedantic`.
clockblocker
force-pushed
the
upstream-queue
branch
from
November 29, 2026 19:59
fcf8d4e to
abc8516
Compare
…o avoid MSVC STL4038
On MSVC in C++20 mode (/std:c++20), <expected> exists on disk so bare
`#if __has_include(<expected>)` evaluates true and emits warning
STL4038 ("The contents of <expected> are available only with C++23 or
later.") on every translation unit.
Include the C++20 standard <version> header and check
`defined(__cpp_lib_expected) && __cpp_lib_expected >= 202202L` before
including <expected>. Unlike a raw `__cplusplus >= 202302L` check,
this avoids STL4038 under MSVC C++20 while still enabling std::expected
on GCC 13 -std=c++23 (which defines __cplusplus == 202100L) and MSVC
/std:c++latest / /std:c++23preview.
…ata-engineering#565) Updates `rfl::string_to_enum` and `rfl::internal::enums::from_string` (C++20 and C++26) to accept `std::string_view` instead of `const std::string&`, replaces the exception-throwing `std::stoi` numeric fallback with allocation-free `std::from_chars` enforcing full-string consumption, and drops unused `<sstream>`. Upstream PR: munich-data-engineering#802 Closes: munich-data-engineering#565 Downstream receipts: - NVIDIA/cuda-quantum hand-loops `rfl::get_enumerator_array<E>()` just to parse a `std::string_view`: https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Reflection.h#L61-L65 - munich-data-engineering/sqlgen calls `rfl::string_to_enum` directly: https://github.com/munich-data-engineering/sqlgen/blob/265b0a174b661c5905b874f97b064aecb4cded70/include/sqlgen/parsing/Parser_default.hpp#L52-L57
…in headers Cuts ~40k preprocessed lines (~350 ms cold compile time per TU) from thin schema/wrapper headers without any public API changes: - Remove `<functional>` from `include/rfl/internal/cpp20/Result.hpp`. - Remove `<sstream>` from `comparisons.hpp`, `AnyOf.hpp`, `OneOf.hpp`, and `PatternValidator.hpp` (using `std::snprintf` / `std::to_string`; note that `signed char`/`unsigned char` (`int8_t`/`uint8_t`) comparison errors now format as decimal integers rather than raw ASCII characters, while plain `char` stays formatted as a character). - Remove unused `<map>` from `include/rfl/Size.hpp` and add explicit `<cstddef>`. Downstream receipts: - hudson-trading/slang-server intentionally isolates thin rfl headers in `include/Config.h` (included across 13 TUs without `<rfl/json.hpp>`): https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/Config.h#L9-L16 - munich-data-engineering/sqlgen includes thin headers like `<rfl/Result.hpp>` and `<rfl/PatternValidator.hpp>`: https://github.com/munich-data-engineering/sqlgen/blob/265b0a174b661c5905b874f97b064aecb4cded70/include/sqlgen/Result.hpp
…of-bounds literal marks Tracks active ancestor YAML nodes via a thread-local RAII guard across `read_object` and `read_array` so cyclic YAML aliases return an `rfl::Error` instead of overflowing the stack (while preserving non-cyclic DAG aliases and `const Reader` thread safety), and bounds-checks `YAML::Mark::pos` before indexing `_yaml_str`. Upstream PR: munich-data-engineering#801 Downstream receipts: - openmoq/moqx explicitly documents self-referencing YAML alias infinite recursion and tests adversarial cyclic YAML configs: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/src/config/YamlDuplicateKeys.cpp#L23-L24 https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/test/config/LoaderTest.cpp#L605-L625 - FANUC-CORPORATION/fanuc_driver parses YAML configs via `rfl::yaml::load`: https://github.com/FANUC-CORPORATION/fanuc_driver/blob/da5db3f611cdc9dffe687e056c4e79bea584bf5c/fanuc_libs/gpio_config/src/gpio_config.cpp#L18
…rflow, and uint64_t write wraparound `rfl::yaml::Reader::to_basic_type` previously parsed every integral type via `node.as<int64_t>()` followed by an unchecked `static_cast<T>`, and `rfl::yaml::Writer::insert_value` cast every integral type via `static_cast<int64_t>(_var)`, causing four bugs: 1. Negative YAML values silently wrapped into unsigned integers (e.g. `-1` became `UINT64_MAX` / `255`). 2. Out-of-range values silently truncated when narrowed into `int8_t`, `uint8_t`, `int16_t`, `uint16_t`, `int32_t`, or `uint32_t`. 3. Valid `uint64_t` values above `INT64_MAX` (up to `UINT64_MAX`) failed `as<int64_t>()` on read. 4. Writing `uint64_t` values above `INT64_MAX` wrapped to negative YAML scalars (e.g. `UINT64_MAX` emitted `-1`), breaking round-trips once the reader rejects negative-to-unsigned wraparound. Bring `rfl::yaml::Reader` and `rfl::yaml::Writer` into parity with `rfl::json` (following munich-data-engineering#746): - In `rfl::yaml::Reader::to_basic_type`, dispatch unsigned and signed integral targets separately: verify `IsScalar()`, reject leading `'-'` for unsigned targets, parse via `as<uint64_t>()` / `as<int64_t>()`, and range-check against `std::numeric_limits<Target>`. - In both `rfl::yaml::Writer::insert_value` overloads, emit unsigned integrals via `static_cast<uint64_t>(_var)`. Eliminates a documented downstream workaround in `openmoq/moqx` (`test/config/LoaderTest.cpp:331-359`, `src/config/ConfigResolver.cpp:1386-1390`).
… forwarding Fixes two bugs in `rfl::xml`: 1. `rfl::xml::Reader::get_field_from_array` never incremented `i` in its sibling loop, causing any `_idx > 0` to always fail out-of-bounds (also fixes the `"of of bounds."` typo). 2. `rfl::xml::write(obj, _indent)` dropped `_indent` when forwarding to the `std::ostream&` overload. Upstream PR: munich-data-engineering#800
Replaces MSVC-deprecated `std::getenv` in public header `include/rfl/env/Reader.hpp` with zero-allocation `::getenv_s` (for existence probes) and `::_dupenv_s` (for value reads) under `#ifdef _MSC_VER` (matching `_putenv_s` in `src/rfl/env/Writer.cpp` and `gmtime_s` in `include/rfl/Timestamp.hpp`), guarding empty/null variable names and using `std::size_t` from `<cstddef>`. Eliminates C4996 / `-Wdeprecated-declarations` warnings emitted from the public header on every Windows MSVC and `clang-cl` TU including `<rfl/env.hpp>` (80 public-header warnings across `tests/env`'s 40 TUs).
…y skipping Parent: munich-data-engineering#801 (`yaml::Reader::read_object` recursive alias guard). `rfl::yaml::Reader::read_object` previously wrapped `p.first.as<std::string>()` and `_object_reader.read(...)` in `catch (std::exception& e) { continue; }`, silently dropping mapping entries whose keys were sequences, maps, or aliases to collections (e.g. `[1, 2]: foo` or `{a: 1}: bar`). This caused silent data loss in maps / `rfl::Generic` and silently bypassed `rfl::NoExtraFields`. Validate the mapping key inside the `try` block and return an explicit `rfl::Error` ("YAML mapping key must be a scalar.") whenever a key is neither a scalar nor YAML null, propagating any `yaml-cpp` exception as an `rfl::Error` instead of skipping. Move `_object_reader.read(...)` outside the `try` block (matching all other structured readers) and pass a zero-copy `std::string_view` directly from `p.first.Scalar()` (or `"null"` for YAML null keys `~` / `null` / empty `: val`). Scalar aliases and merge keys (`<<`) continue to work identically. Addresses downstream workaround in `openmoq/moqx` (`src/config/YamlDuplicateKeys.cpp:23-111`, `test/config/LoaderTest.cpp:542-650`).
…y, and default boundaries Hardens noexcept parsing and validation boundaries so exceptions always return `rfl::Error` instead of calling `std::terminate()`: - `AllOf::validate_impl` was marked `noexcept` with no `try`/`catch` at all, so a custom validator throwing even `std::runtime_error` worked in `rfl::Validator<T, V>` but terminated in `rfl::Validator<T, V1, V2>`. - Routes `MapReader` validated keys through non-throwing `KeyType::from_value()` and catches `const std::exception&` + `catch (...)` across both validator and non-validator key paths. - Adds `const std::exception&` and `catch (...)` to `Validator::from_value`, `TupleReader::handle_missing_fields_impl`, `Parser_default`, `ParserTimePoint::from_string`, and `Timestamp::from_string` (marking the `const std::string&` overload `noexcept` as well). Follow-up to: munich-data-engineering#776, munich-data-engineering#778, munich-data-engineering#779, munich-data-engineering#782 (Maintainer guide: report failures through `rfl::Result`, never by terminating.)
Constrains `ViewReader::assign_if_field_matches<i>` and `ViewReaderWithDefault::assign_if_field_matches<i>` via `requires(i != ViewType::pos_extra_fields())` (with a no-op overload for `i == ViewType::pos_extra_fields()`) so an input key literally named after the C++ `rfl::ExtraFields<T>` member (e.g. `"extra_fields"`) is captured into `ExtraFields` instead of colliding with the member slot and failing to parse as `Object<T>`, without introducing a capture-lambda wrapper in the hot `assign_to_matching_field` fold expression. Split from the parser-symbol-isolation work as an independent bugfix so behavioral fixes are not buried inside a compile-time refactor.
Document all third-party libraries vendored under `include/rfl/thirdparty/` and `src/yyjson.c` (`yyjson`, `CTRE`, and `enchantum`) in a dedicated `THIRD_PARTY_NOTICES.md` at the repository root, linked from `README.md`: - Component table with vendored paths, versions (`yyjson` 0.12.0, `CTRE` 3.10.0, `enchantum` vendored from PR munich-data-engineering#441), upstream URLs, SPDX license expressions (`MIT`, `Apache-2.0 WITH LLVM-exception`), and exact CMake/header inclusion conditions (including clarifying that bundled `yyjson` is only compiled when `REFLECTCPP_USE_BUNDLED_DEPENDENCIES=ON` and JSON/Avro/CBOR/UBJSON is enabled, that `<rfl.hpp>` and format umbrella headers unconditionally include `PatternValidator.hpp` / CTRE, and how `BUILD_INTERFACE` include paths interact with `__has_include`). - Full verbatim license texts for `yyjson`, `CTRE`, and `enchantum` (including `Copyright (c) 2025 ZXShady` from upstream `LICENSE`). Addresses manual third-party license auditing workarounds in enterprise downstream consumers (`NVIDIA/cuda-quantum` `LICENSES/README.md`, `NOTICE`; `nvidia-holoscan/holoscan-sdk` `NOTICE.txt`).
In MSVC __FUNCSIG__, an out-of-enumerator zero cast of an 8-byte enum
(int64_t / uint64_t) formats as `(enum T)0x00` (5-byte suffix) rather
than `(enum T)0x0` (4-byte suffix). In vendored
`enchantum_msvc.hpp::enum_in_array_name<E{}>()`, removing only 4 bytes
left a trailing `)` on the computed enum type prefix, causing
`get_elements()` to strip 1 extra character from every enumerator name
of any 64-bit enum lacking a 0 enumerator (for example,
`WideWireEnum::small_val` -> "mall_val").
Backports upstream `ZXShady/enchantum@66acc35f` ("Fix 64 bit msvc
parsing") verbatim so vendored enchantum aligns with external vcpkg/Conan
enchantum >= 0.5.0 (munich-data-engineering#762) rather than diverging (munich-data-engineering#669), avoids the 22-file
churn of a full vendor refresh, and drops away cleanly on the next vendor
bump. Adds regression tests covering both scoped and unscoped non-zero-based
`int64_t` and `uint64_t` enums.
…:Generic
Flattens redundant `{"anyOf":[{"anyOf":[...]},{"type":"null"}]}` into a single
`anyOf` containing `{"type":"null"}` whenever the inner `AnyOf` carries no
annotations (preserving annotated inner schemas intact, and avoiding duplicate
`null` branches for nested optionals). Uses a structured-binding helper over
`schema::Type::Annotations` so future annotation fields cannot silently drift.
Downstream receipts:
- openmoq/moqx committed `config.schema.json` emits double-nested `anyOf` at
2 live sites (`namespace_match`, `track_match`):
https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/config.schema.json#L510-L557
- hudson-trading/slang-server defines dozens of `std::optional<rfl::Variant<...>>`
LSP fields:
https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/lsp/LspTypes.h#L3892-L3969
…h-data-engineering#692) Adds `rfl::cli::usage<T, Ps...>(program_name, with_details)` in an isolated header (`include/rfl/cli/usage.hpp`) to render command-line usage lines and aligned argument descriptions directly from `rfl::cli`'s option table and format-agnostic schema, matching `rfl::cli::read<T, Ps...>`. Judge polish applied: - Preserves cv-qualification in `add_usage_field_meta` so `const rfl::DefaultVal<T>` inside `rfl::NamedTuple` is accurately reported as required. - Guards `path_separator` for root `std::map<std::string, V>` so keys render `--<key>=<value>` instead of `--.<key>=<value>`. - Drops unused `<rfl/internal/processed_t.hpp>` and includes `<rfl/to_generic.hpp>` for standalone `<rfl/cli/usage.hpp>` builds. Closes: munich-data-engineering#692 (Maintainer: "A PR is very welcome!") Refs: munich-data-engineering#347
Exposes version-guarded `inline constexpr` flag constants in `rfl::json` (combinable with `|`) for common yyjson read and write options — including `allow_comments`, `allow_trailing_commas`, `jsonc`, `pretty_two_spaces`, `newline_at_end`, `allow_bom`, and JSON5 flags — matching the existing `rfl::json::pretty` convention and guarded by `YYJSON_VERSION_HEX` for Conan yyjson/0.10.0 compatibility. Downstream receipt: - hudson-trading/slang-server passes raw `YYJSON_*` macros at 10 sites across 6 files, including literally mixing `rfl::json::pretty` with raw `YYJSON_WRITE_PRETTY_TWO_SPACES`: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/src/gen_config_main.cpp#L43 https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/src/Config.cpp#L21 https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/src/SlangServer.cpp#L929-L984
…tors, and flatten Moves per-field serialization, schema building, missing-field handling, and destructor helpers out of `NamedTupleParser<..., FieldTypes...>` into free templates parameterized only on each field's type (never the enclosing `NamedTuple` pack), and skips instantiating destructors for trivially destructible fields/arrays. Eliminates O(N^2) symbol-table and DWARF growth on wide structs with zero public API changes. Split from parser-symbol-isolation (#118) into an independent, reviewable chunk (no lookup algorithm changes; `to_default_generic` fast-path and `ViewReader` isolation follow in separate commits). Follow-up to: munich-data-engineering#795, munich-data-engineering#799 Downstream receipts (combined Wave 1 N=3 interleaved medians vs main): - hudson-trading/slang-server (`SlangServer.cpp` Debug): -15.0% `.o` Clang, -9.6% GCC, -6.1% wall - openmoq/moqx (`Loader.cpp` Debug): -17.5% `.o` Clang, -13.5% GCC, -4.4% wall - FANUC-CORPORATION/fanuc_driver (`serialization.cpp` Debug): -27.1% `.o` Clang, -9.9% wall - games-on-whales/wolf (`unix_socket_server.cpp` Release): -19.4% `.o` Clang
…tVal Adds `rfl::internal::apply_to_fields` (C++20 and C++26) to invoke a visitor directly on structured-binding field references without materializing `rfl::Tuple` or `rfl::NamedTuple`, and rewrites `HasDefaultVal<T>` on top of it (dropping `#include "../NamedTuple.hpp"` in favor of a forward declaration and fixing a raw-pointer false positive). Judge polish applied: - Qualifies `rfl::internal::apply_to_fields(...)` and `cpp20::apply_to_fields_impl<...>` to prevent ADL ambiguity when user namespaces define `apply_to_fields`. - Guards `HasDefaultVal<T>`'s `requires` clause with `!is_named_tuple_spec<T>::value` before `std::is_aggregate_v<T>` so forward-declared `NamedTuple<...>` stays well-formed without including `NamedTuple.hpp`. - Uses `is_default_val` in `HasDefaultVal<NamedTuple<Fields...>>` so it strips one pointer level as documented (instead of two), and renames function template `has_default_val_type_v` to `has_default_val_field`. Downstream validation: - Verified 0 warnings and 96/96 PASS on munich-data-engineering/sqlgen (metaprogramming canary) plus slang-server, moqx, fanuc-libs, and wolf.
…tReader and ParserTaggedUnion Direct follow-up to munich-data-engineering#766 (`Error::details()`): - `FieldVariantReader::try_one` constructed a fresh `Error(stream.str())` instead of calling `wrap_error(stream.str(), std::string(_disc_value), std::move(_e))`, discarding nested field paths and collapsing multi-error detail vectors for externally-tagged `rfl::Variant<rfl::Field<...>, ...>`. - `ParserTaggedUnion` dropped the discriminator path segment (`_discriminator` or index `0` under `NoFieldNames`) from `Error::details()` on missing, non-string, or unknown discriminator values. Preserves `Error::what()` byte-for-byte with zero API changes. Follow-up to: munich-data-engineering#766
…m_fields Replaces the O(N) linear SFINAE recursion in `rfl::internal::cpp20::num_fields` with an O(log N) exponential probe + binary search, cutting wide-struct C++20 reflection compile time and bounding template instantiation depth in +49/-4 LOC with zero public API changes. Downstream wide-struct / `num_fields` consumers: - openmoq/moqx invokes `num_fields` 27x in one TU: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/test/config/ConfigSerializerTest.cpp#L26-L128 - hudson-trading/slang-server defines 376 LSP structs up to 36 fields: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/lsp/LspTypes.h#L3816-L3976 - FANUC-CORPORATION/fanuc_driver has 23-field packet structs: https://github.com/FANUC-CORPORATION/fanuc_driver/blob/da5db3f611cdc9dffe687e056c4e79bea584bf5c/fanuc_libs/rmi/include/rmi/packets.hpp#L641-L666
…WithDefault Lifts per-field parsing, placement-move, move-assign, error-recording, and extra-field helpers out of `ViewReader<..., ViewType, ...>` and `ViewReaderWithDefault<..., ViewType, ...>` into free function templates parameterized only by each field's type (never the enclosing `ViewType`), keeping linear field-name dispatch (inline for `size_ <= 4`, out-of-line for wider structs) and the compile-time positional read fast path. Parent: depends on `fix(parsing): capture input keys matching ExtraFields member name` (preserving the `is != ViewType::pos_extra_fields()` guard). Independent of `NamedTupleParser` helper isolation; wide-struct `FieldNameLookup` follows in a dedicated child commit. Judge polish applied: - Zero `[[maybe_unused]]` annotations (per munich-data-engineering#582): unmatched-name handling dispatches directly into `handle_extra_field*` / `handle_no_extra_fields_error` with only the parameters used by each branch. Follow-up to: munich-data-engineering#795, munich-data-engineering#799
…neering#731) Adds opt-in whole-enum wire-name casing transform processors (`rfl::TransformEnumNames<...>` plus aliases `EnumSnakeCaseToKebabCase`, `EnumSnakeCaseToCamelCase`, `EnumSnakeCaseToPascalCase`, `EnumCamelCaseToSnakeCase`, `EnumToLowerCase`, `EnumToUpperCase`) across read, write, `rfl::enum_to_string`, `rfl::string_to_enum`, and JSON Schema generation. Resolved wire-name tables are cached once per `(EnumType, EnumNameTransform)`. Parent: depends on `feat(enums): accept std::string_view in rfl::string_to_enum (munich-data-engineering#565)` (open upstream PR munich-data-engineering#802). Per-enum overrides/trait (`rfl::EnumNames<E>`, #106) is split into a separate child commit on top of this processor seam. Judge polish applied: - Moves non-template `apply_enum_name_transform` out-of-line into `src/rfl/TransformEnumNames.cpp` (`RFL_API`, wired via `src/reflectcpp.cpp`). - Places `enum_name_transform_v` in `include/rfl/internal/enum_name_transform_v.hpp` (mirroring `enum_names_only_v.hpp` with `std::remove_pointer_t`). - Adds `EnumCamelCaseToSnakeCase` for parity with `rfl::CamelCaseToSnakeCase` (munich-data-engineering#588). - Accepts variadic `class... Ps` on `rfl::enum_to_string` and `rfl::string_to_enum`, strips `std::remove_cvref_t<EnumType>`, and guards `config::enum_descriptions` so untransformed enums avoid static heap caches. Refs: munich-data-engineering#731 (Maintainer: "My first instinct would be a processor, but I need to give it some thought.") Downstream receipts: - NVIDIA/cuda-quantum maintains 4 hand-written `rfl::Reflector<E>` switch tables for `snake_case` -> `kebab-case` YAML enums: https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Yaml/TargetConfigYamlAdapters.h#L27-L75 https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Yaml/v2/QuakeUnmappedProfileYaml.h#L16-L53 - openmoq/moqx duplicates `enum class QuicStack` as `rfl::Literal` + switch mapper: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/src/config/loader/ParsedConfig.h#L291 - munich-data-engineering/sqlgen post-processes `enum_to_string` across all 4 SQL backends: https://github.com/munich-data-engineering/sqlgen/blob/265b0a174b661c5905b874f97b064aecb4cded70/src/sqlgen/sqlite/to_sql.cpp#L338-L340 - games-on-whales/wolf lowercases `enum_to_string`: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/api/openapi.cpp#L92
Exposes `rfl::type_name<T>()` and `rfl::type_name_v<T>` via a thin, self-contained public header (`<rfl/type_name.hpp>`, mirroring `<rfl/num_fields.hpp>` from munich-data-engineering#451/munich-data-engineering#465) returning a compile-time `std::string_view` directly from `rfl::internal::get_type_name_str_view<T>()` without instantiating `rfl::Literal` or `rfl::internal::StringLiteral`. Parent: depends on `fix(reflection): fix dangling string_view in rfl::internal::get_type_name_str_view` (open upstream PR munich-data-engineering#804). Judge polish applied: - Drops redundant `rfl::num_fields_v<T>` (`rfl::num_fields<T>` is already a public variable template since munich-data-engineering#465). - Uses munich-data-engineering#804's `internal::get_type_name_str_view<T>()` directly to avoid `StringLiteral<N>` / `make_index_sequence<N>` bloat. Precedent: munich-data-engineering#451 Downstream receipts: - NVIDIA/cuda-quantum calls private `rfl::internal::get_type_name_str_view<T>()` with comment "Unfortunately, this has to use a private API of reflect-cpp": https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Reflection.h#L27-L31 - munich-data-engineering/sqlgen hand-rolled `sqlgen::internal::get_type_name_str_view`: https://github.com/munich-data-engineering/sqlgen/blob/265b0a174b661c5905b874f97b064aecb4cded70/include/sqlgen/internal/get_type_name.hpp#L13-L44 - games-on-whales/wolf instantiates `rfl::type_name_t<...>().str()`: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/api/api.cpp#L26
Adds `rfl::parsing::to_default_generic` so scalar and `std::optional<scalar>` default values (`bool`, plain integers, floating-point, `std::string`) construct `rfl::Generic` directly during JSON Schema emission instead of instantiating `rfl::to_generic<ProcessorsType>` / `rfl::generic::Writer`, while keeping complex types on `rfl::to_generic` with identical semantics. Parent: depends on `perf(parsing): isolate per-field helpers in NamedTupleParser, destructors, and flatten` for `build_named_tuple_field_schema`. Judge polish applied: - Drops the consumer-specific `std::vector<std::string>` special case (falls back cleanly to `rfl::to_generic`) and documents parity with `rfl::generic::Writer::to_generic`.
…ta-engineering#683) Adds the opt-in `rfl::IntegerBounds` processor emitting C++ integer width `minimum`/`maximum` keywords in JSON Schema (`Type::BoundedInteger` handled across JSON, Avro, and Cap'n Proto schema emitters), excluding `bool` and character types to prevent x86_64 vs ARM64 signedness drift. Judge polish applied: - Simplifies `BoundedInteger::maximum_` and `json::schema::Type::Integer::maximum` from `rfl::Variant<int64_t, uint64_t>` to `std::uint64_t`, removing `.visit()` boilerplate in Avro and Cap'n Proto schema emitters. - Strips `std::remove_cvref_t<T>` and guards `sizeof(U) <= sizeof(std::int64_t)` in `is_bounded_integer_v`, uses `inline constexpr bool`, qualifies `std::` fixed-width types, and documents `rfl::IntegerBounds` in `docs/content/processors.md`. Closes: munich-data-engineering#683 (Maintainer: "sorry, I misunderstood the issue. I think this is very possible.") Downstream receipts (bare `"type": "integer"` with zero bounds today): - openmoq/moqx: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/config.schema.json#L256-L259 - hudson-trading/slang-server: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/clients/vscode/resources/config.schema.json#L29-L33 - games-on-whales/wolf: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/api/api.hpp#L55-L56
…ing includes in make_type_name.hpp Fixes Undefined Behavior in `rfl::parsing::replace_non_alphanumeric` where `std::isalnum(ch)` was called on a plain `char` (triggering UB and MSVC Debug CRT assertions on negative/UTF-8 bytes; sole remaining uncast `<cctype>` call in `include/` and `src/`). Also adds missing `#include <cctype>` and `#include <string>` for header self-containment.
…pr helpers `StringLiteral` is already part of reflect-cpp's public template signature surface (`rfl::Field`, `rfl::Literal`, `rfl::Rename`, `rfl::Description`, `rfl::Timestamp`, `rfl::Pattern`), forcing downstream consumers writing wrappers, partial specializations, or composed compile-time names to depend on `<rfl/internal/StringLiteral.hpp>` and `rfl::internal::StringLiteral`. - Promote `rfl::StringLiteral<N>` to a self-contained public header `<rfl/StringLiteral.hpp>` (included from `<rfl.hpp>`), preserving the Clang 21/22 C++26 `std::same_as<char>...` constructor workaround (munich-data-engineering#688), marking `string_view()`, `operator==`, and `operator!=` `noexcept`, guarding `N >= 1` via `static_assert`, using `std::size_t`, and clamping `StringLiteral(std::string_view)` to `N - 1` so `arr_[N - 1] == '\0'` always holds. - Keep `<rfl/internal/StringLiteral.hpp>` as a backwards-compatible forwarding header with `using rfl::StringLiteral;` so CTAD NTTPs, partial specializations, and existing includes remain 100% compatible. - Add `constexpr` `operator+` concatenation on `rfl::StringLiteral<N1>` + `rfl::StringLiteral<N2>` returning null-terminated `rfl::StringLiteral<N1 + N2 - 1>`. - Add `static constexpr std::string_view name_view() noexcept` on single-value `rfl::Literal<_name>`, returning a `string_view` backed by static storage duration. Addresses downstream workarounds in `munich-data-engineering/sqlgen` (41 headers still referencing `rfl::internal::StringLiteral` plus custom `GetNameFromLiteral`) and `openmoq/moqx` (`src/config/loader/StringLiteral.h`).
…data-engineering#375) Adds opt-in `rfl::VariantsAsOneOf` so `rfl::json::to_schema` emits `oneOf` instead of `anyOf` for `rfl::Variant`, `std::variant`, and `FieldVariantParser` while preserving the backwards-compatible `anyOf` default (for overlapping alternatives) and keeping `std::optional` and `rfl::Generic` as `anyOf`. (Note: `std::expected` delegates schema generation to `rfl::Variant`, so it also emits `oneOf` under `VariantsAsOneOf`.) Parent: depends on `feat(json-schema): emit oneOf for rfl::TaggedUnion in JSON Schema (munich-data-engineering#375)` for `schema::Type::AnyOf::mutually_exclusive_` and `OneOf` emission in `src/rfl/json/to_schema.cpp`. Judge polish applied: - Replaces post-hoc `_definitions` AST mutation for `rfl::Generic` with `internal::remove_variants_as_one_of_t<ProcessorsType>`, delegating cleanly to `Parser<R, W, Generic, ...>::to_schema`. - Adds direct `<rfl/Generic.hpp>` and `<rfl/internal/variants_as_one_of_v.hpp>` includes in `Parser_default.hpp` plus multi-processor composition tests. Refs: munich-data-engineering#375 Downstream receipt: - openmoq/moqx defines 5 mutually-exclusive `rfl::Variant` config schemas currently forced to emit `anyOf` in committed `config.schema.json`: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/config.schema.json#L510-L557 https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/config.schema.json#L1188-L1203 https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/config.schema.json#L1977-L2001
…d dispatch Parent: `perf(parsing): isolate per-field helpers in ViewReader and ViewReaderWithDefault` Adds `rfl::parsing::FieldNameLookup<rfl::Literal<_names...>>` in `include/rfl/parsing/find_field_index.hpp` and wires it into `ViewReader` and `ViewReaderWithDefault` for structs with > 4 fields: - Lookup tables are keyed solely on `ViewType::Names` (`rfl::Literal<...>`), so field wrappers like `rfl::Description` or different formats/processors share the same lookup table without duplicating instantiations. - Sequential-key cursor hint (`find_with_hint`) hits O(1) when keys arrive in declaration order; `RFL_COLD` fallback uses a linear scan for <= 8 fields and a constexpr-heapsorted binary search for > 8 fields (avoiding reliance on constexpr `std::sort` in older libc++ releases). - Keeps the small-struct (<= 4 fields) inline fold path and positional compile-time index path unchanged, and preserves exact `ExtraFields` / `NoExtraFields` / duplicate-key semantics with zero `[[maybe_unused]]` annotations. - Adds focused tests in `tests/json/test_field_name_lookup.cpp` covering small, medium (5..8), wide (> 8), out-of-order, duplicate-key, varied key lengths, and empty `Literal<>` instantiations. Benchmarks (N=3 interleaved Wave 1 vs upstream/main, Clang 23.1.6 / GCC 13.4.0): - Synthetic wide structs (`compile_stress_wide.cpp`, 32/64/128 fields): -17.0% wall / -14.9% RSS / -32.4% .o (Clang Debug); -20.0% wall / -13.0% RSS / -74.8% .o (Clang Release); -9.2% wall / -26.2% .o (GCC Debug); -7.7% wall / -31.4% .o (GCC Release). - Real OSS consumers: `slang-server` `SlangServer.cpp` -6.1% wall / -15.0% .o (Clang Debug), -8.6% wall / -8.0% RSS (GCC Release), `Config.cpp` -46.1% .o (Clang Release); `moqx` `Loader.cpp` -17.5% .o (Clang Debug), -5.4% wall (GCC Release); `fanuc-libs` `serialization.cpp` -9.9% wall / -27.1% .o (Clang Debug); `wolf` `unix_socket_server.cpp` -19.4% .o (Clang Release). - Runtime parity (`reflect-cpp-bench-json` Release): `BM_licenses` -11.1% faster GCC (+0.9% Clang), `Record2` +22.8% faster GCC (-2.3% Clang), `Record16` +11.0% faster GCC (-1.8% Clang / +0.1% FailFast), `BM_person_read` -2.5% faster Clang (+0.7% GCC).
…d Cap'n Proto helpers When a custom type exposes a `ReflectionType` (or `rfl::Reflector<T>::ReflType`) wrapped in `rfl::Description` or `rfl::Deprecated`, `Parser_default::make_reference` stores `Type::Description` or `Type::Deprecated` directly in `_definitions[name]`. While `type_to_avro_schema_type` and `type_to_capnproto_schema_type` already unwrapped both wrappers, three schema helper predicates did not: - `rfl::avro::is_named_type` (`src/rfl/avro/to_schema.cpp`): failed to recognize wrapped records/enums as named types, emitting duplicated anonymous `unnamed_N` definitions instead of named references. - `rfl::capnproto::is_named_type` (`include/rfl/capnproto/is_named_type.hpp`): failed to recognize wrapped structs/enums/unions/maps as named types (and was missing `#include <type_traits>` for standalone compilation). - `rfl::capnproto::string_map_to_capnproto_schema_type` (`src/rfl/capnproto/to_schema.cpp`): failed to detect wrapped `Type::Literal` values via `is_literal_type`, emitting invalid generic `Map(Enum)` instead of `ScalarMap`. Adds focused Avro and Cap'n Proto regression tests for `Description`- and `Deprecated`-wrapped custom `ReflectionType` definitions.
Parent: `feat(enums): add rfl::TransformEnumNames processors (munich-data-engineering#731)` Adds the opt-in `rfl::EnumNames<E>` specialization trait and `rfl::get_enum_wire_names<E, Ps...>()` utility so enums with non-identifier wire strings (e.g., `"c++20"`, `"nvq++"`, `"*"`), C++ keyword clashes, or enumerators outside the default reflected range can declare custom wire names across JSON, CLI, YAML, XML, Generic, and JSON Schema without duplicating enumerators as `rfl::Literal<...>`: - Supports static `overrides` (array or borrowed `overrides()` returning `std::span`, with `static_assert` rejecting dangling by-value containers) and per-enum `transform` (`EnumNameTransform` constant or custom callable). - `overrides` takes precedence over `transform`; when only `overrides` is specified, non-overridden enumerators still inherit any `rfl::TransformEnumNames<...>` processor passed to `read`/`write`/`to_schema`. - Zero-overhead `if constexpr` fast path when neither `EnumNames<E>` nor `TransformEnumNames` is active; resolved tables are cached per `(EnumType, EnumNameTransform)`. - Public `rfl::get_enum_wire_names<E, Ps...>()` accepts variadic processors, and throwing custom `transform` callbacks are caught into `rfl::Error` across both `ParserEnum::read` and direct `rfl::string_to_enum`. Open design question for upstream review: whether the trait should live at `rfl::EnumNames<E>` (matching `rfl::Reflector<T>`) or `rfl::config::enum_names<E>` (matching `rfl::config::enum_range<E>` / `rfl::config::enum_descriptions<E>`). Refs: munich-data-engineering#106 (Maintainer: "something along these lines is possible") Downstream receipts: - NVIDIA/cuda-quantum hand-written Reflector tables for non-identifier wire strings (e.g., `c++20`, `nvq++`): https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Yaml/TargetConfigYamlAdapters.h#L27-L75 https://github.com/NVIDIA/cuda-quantum/blob/81ef20d9d4a1e0912a6dbc68637ece017e8fd324/cudaq/lib/Target/Yaml/v2/QuakeReferenceSemanticsProfileYaml.h#L16-L32 - openmoq/moqx custom action wire strings (`"*"` / domain verbs) & config enums: https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/src/auth/Action.h#L24-L102 https://github.com/openmoq/moqx/blob/60bab7f13925acbaf578670223e660d71e891547/src/config/ConfigResolver.cpp#L35-L48
…h-data-engineering#368) Adds `rfl::json::Raw` so JSON subtrees can be read and written verbatim without materializing intermediate `rfl::Generic` C++ ASTs or touching core parser headers: - Out-of-line `RFL_API` implementation in `src/rfl/json/Raw.cpp` (wired via `src/reflectcpp_json.cpp`) plus additive raw-emission methods on `rfl::json::Writer` (`yyjson_mut_rawncpy`). - `Parser<generic::Reader, generic::Writer, json::Raw>` bridging so `rfl::DefaultVal<rfl::json::Raw>`, `rfl::to_generic`, `rfl::from_generic`, and `rfl::json::to_schema` work seamlessly. - Non-JSON formats fail cleanly at compile time via `static_assert`. Judge polish applied: - Tightened unchecked string constructors to private; `Raw::from_string()` (strict RFC 8259 validated, returning `Result<Raw>`) is the safe default, with explicit `Raw::from_trusted_string()` opt-in for pre-serialized JSON. - Added standard const-only reflect-cpp accessors `get()`, `operator*()`, and `operator()()`. - Switched `Raw::from_json_obj` to `yyjson_val_write_opts(..., &err)` so serialization failures (e.g., `NaN`/`Infinity`) include `err.msg`. - Handled empty/moved-from `value_` in `Raw::to_generic()` (returning null `Generic`) and added `catch (...)` in `noexcept` `Raw::from_generic()`. - Updated `static_assert` message to mention both `rfl::json` and `rfl::Generic`. Refs: munich-data-engineering#368 Downstream receipts: - hudson-trading/slang-server double-reflects JSON-RPC params via `rfl::Generic`: https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/lsp/JsonRpc.h#L23-L43 https://github.com/hudson-trading/slang-server/blob/1b413a4655877a55b3f8a450c23e4ba6c2bf4267/include/lsp/JsonRpcServer.h#L53-L132 - games-on-whales/wolf stores raw Docker JSON as escaped `std::string` and re-parses `to_schema` output into `rfl::Object<rfl::Generic>`: https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/state/serialised_config.hpp#L98 https://github.com/games-on-whales/wolf/blob/ac2461f68feda41fdc7a7c8e812b9ab4b80520b7/src/moonlight-server/api/openapi.cpp#L17-L69
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.
Upstream PR Queue (
upstream-queue)Canonical, single-branch queue of self-contained, reviewable PRs intended to be drip-fed upstream to
munich-data-engineering/reflect-cpp1–2 PRs at a time againstupstream/main, ordered strictly from easiest / highest mergeability score at the bottom (closest tomain) to hardest at the top while honoring parent-before-child dependencies. The queue shrinks as PRs merge upstream and grows whenever a standalone, landable fix is added or extracted from speculative work.Speculative / design-heavy work (currently
discuss/ssot) stacks directly on top ofupstream-queueso new features automatically inherit all queued fixes and compile-time wins without constant branch reshaping. When speculative development uncovers a standalone bugfix, it drops intoupstream-queue(as done for items#2,#14,#23,#30,#34below) anddiscuss/ssotrebases cleanly on top. CMake/build onboarding work lives separately onupstream-queue-for-build-cmakeand is intentionally not mixed into this branch.Mergeability Scoring Rubric (0–100, Cutline
>= 65)Every candidate (and every commit in
discuss/ssot) was evaluated by an isolated fresh Maintainer-Judge calibrated against upstream review history (docs/maintainer-review-guide.md) and verified against pinned real-world OSS consumers from the#138corpus (NVIDIA/cuda-quantum,nvidia-holoscan/holoscan-sdk,openmoq/moqx,hudson-trading/slang-server,games-on-whales/wolf,munich-data-engineering/sqlgen,FANUC-CORPORATION/fanuc_driver):Result, backwards compat, one problem per PR).N=3interleaved A/B compile-time / runtime wins.CHECK_HEADERS), strict-warning cleanliness, future maintenance footprint.Ordered Queue (Bottom → Top, Easiest → Hardest)
S+M+D+R)d1f84224fix(reflection): fix dangling string_view in rfl::internal::get_type_name_str_view+14/-6(2f)30+30+24+14)get_type_name_str_view<T>()returns astring_viewto a destroyed temporaryStringLiteral.#145,cuda-quantume5c60531fix(validation): fix rfl::OneOf broken .and_then().or_else() composition+12/-21(1f)rfl::OneOfrejecting valid inputs when a non-last branch passes, accepting invalid inputs when multiple branches pass, and use-after-move on_errors.discuss/ssot89c36611fix(json): reject uint64 > INT64_MAX instead of silently wrapping into signed integers+12/-4(1f)29+29+20+15)> INT64_MAXinto negativeint64_tvalues.slang-serverb9dc1e93feat(json-schema): emit oneOf for rfl::TaggedUnion in JSON Schema (#375)+19/-5(3f)29+29+22+12)oneOf(notanyOf) for mutually-exclusiverfl::TaggedUniondiscriminators.wolf07ef2b6efix(headers): eliminate -Wextra, -Wextra-semi, -Wsign-conversion, and -Wunused-parameter warnings+22/-18(14f)29+25+23+15)-Wall -Wextra -Werrorbuilds need fewer suppressions.#140(partial),slang-server,wolf,sqlgen4879f7e2fix(parsing): gate <expected> include behind <version> feature test to avoid MSVC STL4038+3/-1(1f)29+28+21+14)/std:c++20warning STL4038 (and/WXbreaks) on every TU including<rfl.hpp>via<version>+__cpp_lib_expected >= 202202Lwhile preserving C++23std::expectedon GCC 12/13+, Clang/libc++, and MSVC.#140(partial), MSVC 19.44/std:c++20d9ae7120feat(enums): accept std::string_view in rfl::string_to_enum (#565)+49/-20(4f)29+28+23+12)std::string_viewinrfl::string_to_enumand replacesstd::stoiwithstd::from_chars+ full underlying-width parsing.#150,cuda-quantumb14e27d8perf(headers): trim <functional>, <sstream>, and unused <map> from thin headers+79/-49(6f)28+29+22+13)<functional>,<sstream>, and unused<map>from hot public headers (Result.hpp,Variant.hpp,enums.hpp, etc.), cutting ~40k preprocessed lines.#185(partial),slang-server6b4a388afix(yaml): guard rfl::yaml::Reader against recursive aliases and out-of-bounds literal marks+79/-2(3f)29+28+22+12)yaml_str_[Mark().pos]reads on programmatic nodes.moqx489eba42fix(yaml): reject negative-to-unsigned wraparound, narrow integer overflow, and uint64_t write wraparound+64/-18(2f)29+28+23+11, ~93 post-polish)#9)uint64_t > INT64_MAXread failure, and companionyaml::Writeruint64_twraparound (parity with JSON#746/#617).#161,moqx79b12685fix(xml): fix get_field_from_array index increment and write() indent forwarding+3/-3(2f)30+29+15+15)xml::Reader::get_field_from_arrayand dropped_indentinxml::write(ostream).4e258590fix(env): use getenv_s and _dupenv_s under _MSC_VER in rfl::env::Reader+32/-5(1f)29+28+18+14)std::getenvwith zero-alloc::getenv_s(probe) and::_dupenv_s(read) under_MSC_VERininclude/rfl/env/Reader.hpp, eliminating 80 public-header C4996 /-Wdeprecated-declarationswarnings on Windows MSVC &clang-cl.#140(partial), #694,env/Writer.cpp(_putenv_s),Timestamp.hpp(gmtime_s),clang-cl 19.1.5& MSVC 19.44c7aa574cfix(yaml): return error on non-scalar mapping keys instead of silently skipping+11/-4(1f)29+24+22+13)#801)yaml::Reader::read_objectfrom silently swallowing sequence/map/collection-alias keys (which bypassedNoExtraFields), using zero-copyScalar()views while preservingnull/~/: val, scalar aliases, and<<.#160(non-scalar fix),moqx970f78f0fix(parsing): prevent std::terminate() at noexcept validation, map-key, and default boundaries+70/-21(7f)try/catchinAllOf::validate, switchesMapReaderValidator keys tofrom_value(), and addscatch (...)acrossnoexceptboundaries.discuss/ssot; #674f49d6c8dfix(parsing): capture input keys matching ExtraFields member name+13/-0(2f)assign_if_field_matches<i>viarequires(i != ViewType::pos_extra_fields())(zero-lambda, 0-byte standalone.ooverhead) so keys matching theExtraFieldsmember name are captured instead of colliding.d8892d9cdocs(licensing): add THIRD_PARTY_NOTICES for vendored dependencies+324/-0(2f docs)28+25+22+12)THIRD_PARTY_NOTICES.md(linked fromREADME.md) with SPDX tags, verbatim licenses (yyjson,CTRE3.10.0,enchantumMIT + copyright), and exact CMake/header inclusion conditions.#144,cuda-quantum,holoscan-sdkff639f32fix(enums): backport enchantum MSVC 64-bit enum cast suffix fix+3/-2(1f)30+22+22+12)#26,#35)0enumerator via verbatim backport ofZXShady/enchantum@66acc35f, aligning bundled enchantum with vcpkg/Conan.ZXShady/enchantum@66acc35f, #519, #669, #762, MSVC 19.4404495b88fix(json-schema): flatten nested anyOf for optional variants and rfl::Generic+23/-2(1f)29+24+21+12){"anyOf":[{"anyOf":[...]},{"type":"null"}]}into oneanyOfwhile preserving annotated schemas via structured-binding check.#180(partial),moqx,slang-serverb9081d02feat(cli): add rfl::cli::usage to generate usage and help text (#692)+452/-0(2f)28+28+19+11)--help/ usage strings directly from anyrfl::cli::readstruct (preserving cv-qualifiers and guarding rootstd::map).fc9f041dfeat(json): add first-class rfl::json read and write flag constants+88/-2(2f)29+23+22+11)inline constexprrfl::json::read_*/write_*constants so users stop leaking rawYYJSON_*macros.#169,slang-server(10 sites)54c89d2dperf(parsing): isolate per-field helpers in NamedTupleParser, destructors, and flatten+298/-227(3f)NamedTupleParser<FieldTypes...>to kill#185(partial), Wave 1 A/Ba2d46af1perf(internal): add apply_to_fields and avoid NamedTuple in HasDefaultVal+89/-21(4f)28+28+15+13)rfl::internal::apply_to_fieldsremoves redundantnamed_tuple_t<T>+field_names_t<T>materialization insideHasDefaultVal<T>.#185(partial)dc6fcc62fix(error): preserve structured Error::details() paths in FieldVariantReader and ParserTaggedUnion+13/-5(2f)Error::details()paths inFieldVariantReader::try_oneand adds discriminator segment inParserTaggedUnionfailures.76da80dfperf(internal): use O(log N) exponential + binary search in cpp20::num_fields+49/-4(1f)28+26+16+13)num_fieldsconstructibility probes from#185(partial),slang-server,moqx0ac0ee21perf(parsing): isolate per-field helpers in ViewReader and ViewReaderWithDefault+468/-209(2f)ViewReader&ViewReaderWithDefaultwith lambda-free dispatch (bool matched,size_ == 0guard) and zero[[maybe_unused]].#185(partial), Wave 1 A/B9a5ee9b4feat(enums): add rfl::TransformEnumNames processors (#731)+427/-42(7f)#802)EnumSnakeCaseToKebabCase,EnumCamelCaseToSnakeCase, etc.) with out-of-lineRFL_APItransform and cached tables.#148,cuda-quantum,moqx,sqlgen,wolf950382b1feat(reflection): add public rfl::type_name<T>() and rfl::type_name_v<T>+28/-0(2f)28+21+23+10)#804)consteval std::string_view rfl::type_name<T>()/type_name_v<T>so consumers stop reaching intorfl::internal::.#145,cuda-quantum,sqlgen,wolf8bc0da9aperf(schema): fast-path scalar defaults in NamedTupleParser::to_schema+39/-1(1f)rfl::generic::Writerfor scalar / optional-scalarDefaultValschema defaults (cleanly drops consumer-specificvector<string>case).#185(partial)8bb958f2feat(json-schema): add rfl::IntegerBounds opt-in processor (#683)+127/-4(9f)23+24+22+11)minimum/maximumJSON Schema bounds for fixed-width integers (excludingchartypes), usingstd::uint64_t maximum_.#180(partial),moqx,slang-server5d8a8355fix(schema): cast char to unsigned char for std::isalnum and add missing includes in make_type_name.hpp+4/-1(1f)std::isalnum(char)UB / MSVC Debug CRT assert and adds missing<cctype>/<string>includes.discuss/ssot68161ed0feat(reflection): expose public rfl::StringLiteral header and constexpr helpers+100/-59(4f, net+41)26+23+23+8)rfl::StringLiteral<N>to<rfl/StringLiteral.hpp>(preservingusing rfl::StringLiteral;inrfl::internal), addsconstexpr operator+, and adds zero-allocrfl::Literal::name_view()for single-value literals.#174,sqlgen(41 headers),moqx698a6226feat(json-schema): add rfl::VariantsAsOneOf opt-in processor (#375)+121/-6(8f)28+14+22+10)oneOfforrfl::Variant/std::variantschemas via cleanremove_variants_as_one_of_t(no post-hoc_definitionsAST mutation).moqxc8405697perf(parsing): add FieldNameLookup cursor-hint and binary-search field dispatch+229/-32(3f)FieldNameLookup<Literal<...>>(O(1) sequential cursor hint +RFL_COLDlinear<=8/ constexpr-heapsort binary search>8) shared across wrappers & formats.#185(partial), Wave 1 A/B66486788fix(schema): unwrap Type::Description and Type::Deprecated in Avro and Cap'n Proto helpers+31/-12(3f)Type::Description/Type::Deprecatedin Avrois_named_typeand Cap'n Protois_named_type/is_literal_type(+ missing<type_traits>).discuss/ssotd7c8d1c8feat(enums): add rfl::EnumNames<E> per-enum wire-name trait (#106)+183/-12(3f)#17on MSVC)rfl::EnumNames<E>specialization (overrides+transform) and variadicrfl::get_enum_wire_names<E, Ps...>()for non-identifier / out-of-range wire names.#148,cuda-quantum,moqxabc8516efeat(json): add rfl::json::Raw for passthrough raw JSON values (#368)+328/-0(6f)Raw::from_stringvalidated default + explicitfrom_trusted_string,yyjson_val_write_optserrors, standard accessors, zero core edits).slang-server,wolfPer-Item Upstream-Ready Descriptions
Tier 1 — Top Slam Dunks (Scores 89+, including open upstream munich-data-engineering#800–munich-data-engineering#804)
1.
d1f84224— Fix danglingstring_viewinrfl::internal::get_type_name_str_view(Score 98, Open upstream #804)433795b4(v0.26.1) returnedget_type_name_str_lit<T>().string_view(), which creates a danglingstd::string_viewinto a destroyed temporaryStringLiteral(UB under ASan/UBSan and broken inconstexprevaluation).get_type_name_str_view<T>()directly to the static/compile-timecpp20::get_type_name_str_view<T>()/cpp26::get_type_name_str_view<T>()buffer (zero heap allocation, validconstevallifetime).#145;NVIDIA/cuda-quantumcallsrfl::internal::get_type_name_str_view<T>()directly. Upstream CI on#804: 176/176 green.2.
e5c60531— Fixrfl::OneOfbroken.and_then().or_else()composition (Score 95, Extracted)OneOf::validate_implchainedHead::validate(_value).and_then(...).or_else(...), which (1) rejected valid inputs whenever an earlier branch passed and the last branch failed (even printing"Expected exactly 1 out of 2 validations to pass, but 1 of them did"), (2) accepted invalid inputs when multiple branches passed, and (3) caused use-after-move on_errorsandinclude/rfl/OneOf.hppand expandtests/json/test_one_of.cppto cover first-branch-passes, multiple-branches-pass, and zero-branches-pass.3.
89c36611— Rejectuint64 > INT64_MAXinstead of wrapping into signed integers (Score 93)rfl::json::Reader::to_basic_type<SignedInt>calledyyjson_get_sint/ cast unsignedyyjsonintegers without checking overflow, silently turning JSON values> INT64_MAXinto negative signed integers.rfl::Errorwhen an unsigned JSON integer exceeds the target signed range (consistent with #746 / #617).slang-serverandmoqx.4.
b9dc1e93— EmitoneOfforrfl::TaggedUnionin JSON Schema (Score 92, Refs #375)rfl::TaggedUnionalternatives carry disjoint discriminator literals, yet JSON Schema emittedanyOfinstead ofoneOf, weakening schema validation and OpenAPI codegen.Type::AnyOf::mutually_exclusive_ = trueforParserTaggedUnion::to_schemaand emitschema::Type::OneOfinsrc/rfl/json/to_schema.cpp(only 19 prod LOC across 3 files).games-on-whales/wolf(RunnerTypesemitted asanyOfat 4 OpenAPI sites).5.
07ef2b6e— Eliminate strict warnings in public headers (Score 92, Open upstream #803)-Wextra(-Wmissing-field-initializers),-Wextra-semi,-Wsign-conversion, and-Wunused-parameter(using unnamed parameters per #582) across 14 headers.#140(partial); corpus consumers either wrapreflect-cppin-w/SYSTEMor disable warnings:slang-server,wolf,sqlgen,moqx,fanuc_driver.6.
4879f7e2— Gate<expected>include behind<version>feature test to avoid MSVC STL4038 (Score 92)#if __has_include(<expected>)ininclude/rfl/parsing/ParserExpected.hpp(transitively included by<rfl.hpp>) andtests/{generic,json}/test_expected.cpp. On MSVC/std:c++20,<expected>exists on disk so__has_include(<expected>)evaluates true and emits warningSTL4038("The contents of<expected>are available only with C++23 or later.") on every translation unit, breaking/WXbuilds.<version>(macro-only, zero runtime/compile-time overhead) and guard#include <expected>with#if defined(__cpp_lib_expected) && __cpp_lib_expected >= 202202L && __has_include(<expected>)across all 3 sites (+3/-1prod LOC in 1 file). Unlike a raw__cplusplus >= 202302Lcheck, this preserves C++23std::expectedon GCC 13-std=c++23(which defines__cplusplus == 202100L, per #570) and MSVC/std:c++latest//std:c++23preview. Kept standalone from open upstream #803 per one-problem-per-PR./std:c++20battle-testing; addresses#140(partial) for Windows strict-warning consumers.7.
d9ae7120— Acceptstd::string_viewinrfl::string_to_enum(Score 92, Open upstream #802, Closes #565)std::string_view, replacesstd::stoiwithstd::from_charssupporting full underlying integer widths, and serves as the clean foundation for#26(TransformEnumNames).#150;NVIDIA/cuda-quantum,sqlgen.8.
b14e27d8— Trim<functional>,<sstream>, and unused<map>from thin headers (Score 92)<functional>,<sstream>, and unused<map>includes from thin public headers (Result.hpp,Variant.hpp,enums.hpp, etc.), cutting ~40k preprocessed lines per TU while staying 100%CHECK_HEADERSself-contained.#185(partial); every consumer TU including<rfl/Result.hpp>/<rfl/Variant.hpp>(e.g.,slang-server/include/Config.h,sqlgen/include/sqlgen/Result.hpp). Directly serves maintainer compile-time priority (#641).9.
6b4a388a— Guardrfl::yaml::Readeragainst recursive aliases & OOB literal marks (Score 91, Open upstream #801)YAML::Mark().posbefore indexingyaml_str_.moqxexplicitly documents & tests self-referencing YAML aliases (LoaderTest.cpp:605-625).class RFL_API ActiveNodeGuardfrompublic:intoprivate:onrfl::yaml::Reader; (2) add a brief unit test for theYAML::Mark::posbounds check on a programmaticSetTag("!")node.10.
489eba42— Reject YAML negative-to-unsigned wraparound, narrow integer overflow, anduint64_twrite wraparound (Score 91, ~93 post-polish)rfl::json::Reader, leavingrfl::yaml::Readerparsing every integral viaas<int64_t>()+ uncheckedstatic_cast<T>andrfl::yaml::Writercasting every integral viastatic_cast<int64_t>.rfl::yaml::Reader::to_basic_type(matchingjson::Readererror messages and bounds checks, plus explicitstatic_cast<uint64_t>in theif constexprcomparison for MSVC/W4), AND fixes bothrfl::yaml::Writer::insert_valueoverloads to emit unsigned integrals viastatic_cast<uint64_t>(_var)souint64_t > INT64_MAXround-trips cleanly instead of emitting-1. Added fullwrite_and_readround-trip, non-scalar, quoted-negative, andchar/signed char/unsigned chartests intests/yaml/test_integers.cpp.#161;openmoq/moqxexplicitly comments "The YAML reader wraps a negative uint64_t; the resolver's upper bound rejects it" (ConfigResolver.cpp:1386-1390). Non-overlapping hunks with#9(#801).11.
79b12685— Fix XMLget_field_from_arrayindex increment &write(_indent)forwarding (Score 89, Open upstream #800)rfl::xml:get_field_from_arrayforgot to increment the iterator counter, andxml::write(const T&, std::ostream&, const std::string& _indent)dropped_indent.12.
4e258590— Usegetenv_sand_dupenv_sunder_MSC_VERinrfl::env::Reader(Score 89, Polished)include/rfl/env/Reader.hppcontained the only twostd::getenvcalls ininclude/andsrc/, emitting MSVCC4996/clang-cl-Wdeprecated-declarationson every Windows TU including<rfl/env.hpp>(80 public-header warnings acrosstests/env's 40 TUs; breaking/W4 /WXand-Werrorconsumers that do not define_CRT_SECURE_NO_WARNINGS). Matches existing same-module precedent (_putenv_sinsrc/rfl/env/Writer.cppandgmtime_sininclude/rfl/Timestamp.hpp).std::getenvunder#ifdef _MSC_VER(keeping MinGW onstd::getenv) with zero-allocation::getenv_sinhas_env_varand::_dupenv_s+std::freeinget_value(zero<memory>header bloat). Judge polishes applied: added#include <cstddef>+std::size_tfor strict self-containment, added defensiveif (_name == nullptr || *_name == '\0') return false;guard inhas_env_var, and reconciled commit/PR description to accurately report 80 public-header warnings fixed (leaving 48 test-onlystd::getenvcalls intests/env/untouched to keep the PR 1-file minimal).clang-cl 19.1.5& MSVC 19.44 battle-testing; addresses#140(partial).Tier 2 — High-Confidence Fixes, Compliance Docs, Features, and Compile-Time Wins (Scores 83–88)
13.
c7aa574c— Return error on non-scalar YAML mapping keys instead of silently skipping (Score 88, Polished)#9(6b4a388a— open upstream #801 inrfl::yaml::Reader::read_object).rfl::yaml::Reader::read_objectwrappedp.first.as<std::string>()and_object_reader.read(...)incatch (std::exception& e) { continue; }(a vestige from pre-v0.8 non-Errorsignatures), silently dropping sequence/map/collection-alias mapping keys in maps/rfl::Genericand bypassingrfl::NoExtraFields.IsScalar()/IsNull()checks insidetry(guardingnoexcept read_objectfromYAML::InvalidNode), passed zero-copystd::string_viewdirectly fromp.first.Scalar()(or"null"fornull/~/: val), moved_object_reader.read(...)outsidetry(matching all other readers and preservingViewReaderWithDefaultnoexceptinvariants), fixed*s :alias syntax intests/yaml/test_non_scalar_keys.cppwith explicit"scalar"message assertions, and addedNoExtraFields, empty-key, map-alias, and scalar-alias tests.#160(standalone non-scalar bugfix;NoDuplicateKeysremains parked ondiscuss/ssot);openmoq/moqx(LoaderTest.cpp:542-650).14.
970f78f0— Preventstd::terminate()atnoexceptvalidation, map-key, and default boundaries (Score 88, Extracted)AllOf::validatewasnoexceptwith zerotry/catch(a throwing custom validator worked inValidator<T, V>but calledstd::terminate()inValidator<T, V1, V2>). Also switchesMapReaderValidator keys to non-throwingKeyType::from_value()and addscatch (...)acrossValidator,MapReader,TupleReader,Parser_default,ParserTimePoint, andTimestamp(following #674).15.
f49d6c8d— Capture input keys matchingExtraFieldsmember name (Score 88, Split 1/5 of parser-symbol-isolation)ViewReaderandViewReaderWithDefaultmatched incoming keys againstViewType::Fieldswithout excludingViewType::pos_extra_fields(), so an input key literally named"extra_fields"(matching the C++ member name) failed to be routed intoExtraFields.requires(i != ViewType::pos_extra_fields())overloads onassign_if_field_matches<i>(zero capture-lambda wrapper, empirically verified 0-bytecompile_stress_wide.cpp.ooverhead on Clang 23 Release) +tests/json/test_extra_fields_key_collision.cpp. Parent of#25.16.
d8892d9c— AddTHIRD_PARTY_NOTICES.mdfor vendored dependencies (Score 87, Polished)reflect-cppvendorsyyjson(MIT),CTRE(Apache-2.0 WITH LLVM-exception), andenchantum(MIT) underinclude/rfl/thirdparty/andsrc/yyjson.cwithout a consolidated license notice manifest, forcing enterprise redistributors to scrape embedded headers andCMakeLists.txtmanually.Copyright (c) 2025 ZXShadyaboveenchantum's MIT text (verified against upstreamLICENSE), standardized CTRE version to3.10.0(matchingvcpkg.json& upstreamv3.10.0), explicitly documented that<rfl.hpp>/ format umbrella headers / PCH unconditionally includePatternValidator.hpp(CTRE), and tightenedREFLECTCPP_USE_BUNDLED_DEPENDENCIES/BUILD_INTERFACE/__has_include/REFLECTCPP_INSTALLaccuracy againstCMakeLists.txt.#144;NVIDIA/cuda-quantum(NOTICE:275-321),nvidia-holoscan/holoscan-sdk.17.
ff639f32— Backport enchantum MSVC 64-bit enum cast suffix fix (Score 86, Polished)__FUNCSIG__formats an out-of-enumerator zero cast of an 8-byte enum (int64_t/uint64_t) as(enum T)0x00(5-byte suffix) rather than(enum T)0x0(4-byte suffix). In vendoredinclude/rfl/thirdparty/enchantum/details/enchantum_msvc.hpp, removing only 4 bytes left a trailing)on the computed type prefix and silently stripped the first character of every enumerator name on any 64-bit enum lacking a0enumerator (e.g.,WideWireEnum::small_val->"mall_val").ZXShady/enchantum@66acc35f("Fix 64 bit msvc parsing"). Unlike a divergent local patch, this eliminates divergence between vendored enchantum (pre-0.5.0 from #441) and external vcpkg/Conan enchantum>= 0.5.0(#762), follows surgical enchantum precedent (#519), avoids the 22-file churn of a full vendor refresh, and drops away cleanly on the next vendor bump. Ordered before#26/#35(#106) so#106stays free ofthirdparty/diffs; leavesTHIRD_PARTY_NOTICES.mduntouched (100% independent of#16).*rfl::string_to_enum<...>()dereferences intests/generic/test_enum.cpp(violated #463) with checkedASSERT_TRUE(res.has_value()) << res.error().what(); EXPECT_EQ(*res, ...);assertions and added unscoped 64-bit non-zero enums (UnscopedSigned64NoZero,UnscopedUnsigned64NoZero) so both scoped and unscoped patched branches inenchantum_msvc.hppare tested in Windows MSVC CI.REFLECTCPP_USE_BUNDLED_DEPENDENCIES=ON(WideWireEnum::small_val->"mall-val").18.
04495b88— Flatten nestedanyOffor optional variants andrfl::Generic(Score 86, Polished)std::optional<rfl::Variant<...>>andrfl::Genericcurrently emit double-nested{"anyOf":[{"anyOf":[...]},{"type":"null"}]}. Flattening insidesrc/rfl/json/to_schema.cpp(only 23 prod LOC) keepsparsing::schema::Typeuntouched.has_annotations(schema::Type::Annotations)helper so any future annotation field triggers a compile error if unchecked.#180(partial);moqx/config.schema.json:510-557,slang-server/include/lsp/LspTypes.h:3892-3969.19.
b9081d02— Addrfl::cli::usageto generate usage and help text (Score 86, Refs #692)#790/#798CLI option-table helpers.add_usage_field_meta, guardedpath_separatoron rootstd::mapschemas, replaced unusedprocessed_t.hppwith directto_generic.hpp.20.
fc9f041d— Add first-classrfl::jsonread and write flag constants (Score 85)rfl::json::pretty(#63, cited positively by maintainer on #651; flag passing toread()endorsed on #404 / merged in #425) with version-guardedinline constexprread_*andwrite_*constants.#169;slang-servercurrently mixesrfl::json::pretty | YYJSON_WRITE_PRETTY_TWO_SPACESand uses rawYYJSON_*macros across 10 call sites in 6 files (Config.cpp:21,Logging.h:30-31,SlangServer.cpp:929-984).21.
54c89d2d— Isolate per-field helpers inNamedTupleParser, destructors, and flatten (Score 85, Split 2/5 of parser-symbol-isolation)NamedTupleParser<..., FieldTypes...>into free function templates parameterized only on each field's type (never the enclosingNamedTuplepack), and skips destructor calls on trivially destructible fields/arrays. Zero public API change. Parent of#28. Addresses#185(partial).N=3interleaved medians vsmain):slang-serverSlangServer.cppDebug-6.1%wall /-15.0%.o(Clang),-9.6%.o(GCC);moqxLoader.cppDebug-4.4%wall /-17.5%.o(Clang);fanuc-libsserialization.cppDebug-9.9%wall /-27.1%.o(Clang);wolfunix_socket_server.cppRelease-19.4%.o(Clang).22.
a2d46af1— Addapply_to_fieldsand avoidNamedTupleinHasDefaultVal(Score 84, Polished)rfl::internal::apply_to_fields) avoiding redundantnamed_tuple_t<T>+field_names_t<T>+ valueNamedTupleinstantiations insideHasDefaultVal<T>on every reflected aggregate. Addresses#185(partial).!is_named_tuple_spec<T>::valueguard, stripped single pointer indirection inHasDefaultVal<NamedTuple<...>>, and renamed internal helper tohas_default_val_field.23.
dc6fcc62— Preserve structuredError::details()paths inFieldVariantReaderandParserTaggedUnion(Score 84, Extracted)FieldVariantReader::try_onediscarded nested details by constructing a freshError(stream.str())instead of callingwrap_error, andParserTaggedUnionomitted the discriminator path segment on missing/non-string/unknown discriminator errors. PreservesError::what()byte-for-byte.24.$O(\log N)$ exponential + binary search in
76da80df— Usecpp20::num_fields(Score 83)#185(partial);slang-server/include/lsp/LspTypes.h,moqx,fanuc_driver).Tier 3 — Split Follow-Ups, Processors, and Additive Features (Scores 65–83)
25.
0ac0ee21— Isolate per-field helpers inViewReaderandViewReaderWithDefault(Score 83, Split 3/5 of parser-symbol-isolation)#15(f49d6c8d—fix(parsing): capture input keys matching ExtraFields member name). Parent of#33.ViewReader<..., ViewType, ...>andViewReaderWithDefault<..., ViewType, ...>while keeping lambda-free linear field-name dispatch (size_ == 0guard inread(),<= 4inline,> 4out-of-line, plainbool matchedwith zero out-of-line capture lambdas) and zero[[maybe_unused]]annotations (per #582). Addresses#185(partial).26.
9a5ee9b4— Addrfl::TransformEnumNamesprocessors (Score 83, Split 1/2 of enum-names, Refs #731)#7(d9ae7120— open upstream #802string_to_enum(std::string_view)). Parent of#35.rfl::TransformEnumNames<...>+ aliases (EnumSnakeCaseToKebabCase,EnumSnakeCaseToCamelCase,EnumSnakeCaseToPascalCase,EnumCamelCaseToSnakeCase,EnumToLowerCase,EnumToUpperCase) across read, write,enum_to_string,string_to_enum, and JSON Schema.RFL_APIapply_enum_name_transforminsrc/rfl/TransformEnumNames.cpp(wired viasrc/reflectcpp.cpp), dedicatedinclude/rfl/internal/enum_name_transform_v.hpp, addedEnumCamelCaseToSnakeCase, variadicclass... Ps, guardedenum_descriptionsso untransformed enums allocate nothing.#148; solves 4 OSS consumers immediately —NVIDIA/cuda-quantum,moqx,sqlgen,wolf.27.
950382b1— Add publicrfl::type_name<T>()andrfl::type_name_v<T>(Score 82, Polished)#1(d1f84224— open upstream #804 fixing danglingget_type_name_str_view).consteval std::string_view rfl::type_name<T>()/type_name_v<T>in<rfl/type_name.hpp>. Dropped redundantnum_fields_v<T>per judge feedback (publicrfl::num_fields<T>already exists via #465).#145;NVIDIA/cuda-quantum("Unfortunately, this has to use a private API of reflect-cpp"),sqlgen,wolf.28.
8bc0da9a— Fast-path scalar defaults inNamedTupleParser::to_schema(Score 82, Split 4/5 of parser-symbol-isolation)#21(54c89d2d—perf(parsing): isolate per-field helpers in NamedTupleParser, destructors, and flatten).rfl::generic::Writer/rfl::to_generic<ProcessorsType>for scalar andstd::optional<Scalar>DefaultValschema defaults (dropped consumer-specificstd::vector<std::string>special case per judge review). Addresses#185(partial).29.
8bb958f2— Addrfl::IntegerBoundsopt-in processor (Score 80, Polished, Refs #683)minimum/maximumJSON Schema bounds for fixed-width integers while excluding platform-dependentchartypes.rfl::Variant<int64_t, uint64_t>withstd::uint64_t maximum_, addedstd::remove_cvref_t+sizeof <= int64_tguard,std::-qualified fixed-width types, documented indocs/content/processors.md, addedDefaultVal<Description<..., uint16_t>>test.#180(partial);moqx,slang-server,wolf.30.
5d8a8355— Castchartounsigned charforstd::isalnuminmake_type_name.hpp(Score 80, Extracted)<cctype>call ininclude//src/(UB on negativechar/ MSVC Debug CRT assertion) and adds missing<cctype>and<string>includes for header self-containment.31.
68161ed0— Expose publicrfl::StringLiteralheader andconstexprhelpers (Score 80, Polished)StringLiteralis already part ofreflect-cpp's public template signature surface (rfl::Field,rfl::Literal,rfl::Rename,rfl::Description,rfl::Timestamp,rfl::Pattern), forcing downstream wrapper libraries and partial specializations to reach into<rfl/internal/StringLiteral.hpp>andrfl::internal::StringLiteral. Follows #451 / #465 thin public header precedent while preserving the Clang 21/22 C++26 workaround (#688) and 100% backwards compatibility viausing rfl::StringLiteral;inrfl::internal. Also addsconstexpr operator+concatenation and zero-allocationstatic constexpr std::string_view rfl::Literal::name_view() noexcept(backed by static-storageLiteralHelper<_name>::name_).static_assert(N >= 1)andrequires(N1 >= 1 && N2 >= 1)onoperator+(preventingN == 0underflow), clampedStringLiteral(std::string_view)copy length tostd::min(_str.size(), N - 1)andoperator+second copy toN2 - 1(preserving the#445/#538null-termination invariant), switched tostd::size_t, added Doxygen docstring onoperator+, corrected title (constexprvsconsteval), and expandedtests/json/test_string_literal.cppfor clamping and null-termination.#174;munich-data-engineering/sqlgen(still referencesrfl::internal::StringLiteralin 41 headers + customGetNameFromLiteraleven aftersqlgen#144),openmoq/moqx(hand-rolledstr_concatforrfl::Description). Verified 96/96 PASS onsqlgen(Clang 23 & GCC 13).32.
698a6226— Addrfl::VariantsAsOneOfopt-in processor (Score 74, Polished, Refs #375)#4(b9dc1e93—feat(json-schema): emit oneOf for rfl::TaggedUnion in JSON Schema (#375)).#4for untaggedrfl::Variant/std::variantschemas._definitionsAST mutation with cleanremove_variants_as_one_of_t<ProcessorsType>when loweringrfl::Generic(keepingrfl::GenericasanyOf), added direct header includes, and added multi-processor composition tests.moqx(5 mutually-exclusive objectrfl::Variants emitted asanyOfinconfig.schema.json:1188-1203,1977-2001).33.
c8405697— AddFieldNameLookupcursor-hint and binary-search field dispatch (Score 72, Split 5/5 of parser-symbol-isolation)#25(0ac0ee21—perf(parsing): isolate per-field helpers in ViewReader and ViewReaderWithDefault).ViewType::Names(rfl::Literal<...>),FieldNameLookupshares one lookup table across wrappers and formats, hitsRFL_COLD) to linear scan (<= 8) or constexpr-heapsorted binary search (> 8). Uses plainbool matcheddispatch (zero out-of-linetry_assigncapture lambdas) and explicitFieldNameLookup<Literal<>>specialization with zero[[maybe_unused]]annotations. Addresses#185(partial).origin/main:compile_stress_wide.cpp, 32/64/128 fields): Clang Release-74.94%.o(4.44M -> 1.11M) /-12.29%RSS /-20.0%wall; Clang Debug-17.0%wall /-14.9%RSS /-32.4%.o; GCC Debug-9.2%wall /-26.2%.o; GCC Release-7.7%wall /-31.4%.o.slang-serverSlangServer.cpp-6.1%wall /-15.0%.o(Clang Debug),-8.6%wall /-8.0%RSS (GCC Release),Config.cpp-46.1%.o(Clang Release);moqxLoader.cpp-17.5%.o(Clang Debug),-5.4%wall (GCC Release);fanuc-libsserialization.cpp-9.9%wall /-27.1%.o(Clang Debug);wolfunix_socket_server.cpp-19.4%.o(Clang Release).origin/main, 0 out-of-line dispatch lambdas):Record2+10.15%,Record2, true+2.52%,citm_read+4.54%,BM_person_read-0.24%.Record2+22.76%,Record2, true+18.56%,Record16+14.20%,BM_licenses-12.01%,BM_person_read-0.25%.34.
66486788— UnwrapType::DescriptionandType::Deprecatedin Avro and Cap'n Proto helpers (Score 72, Extracted)ReflectionType/Reflector<T>::ReflTypewrapped inrfl::Descriptionorrfl::DeprecatedstoreType::Description/Type::Deprecateddirectly in_definitions[name]. Unwrapping them inavro::is_named_type,capnproto::is_named_type(also adding missing<type_traits>), andcapnproto::is_literal_typeprevents anonymousunnamed_Nrecords in Avro and invalid genericMap(Enum)in Cap'n Proto.35.
d7c8d1c8— Addrfl::EnumNames<E>per-enum wire-name trait (Score 71, Split 2/2 of enum-names, Refs #106)#26(9a5ee9b4—feat(enums): add rfl::TransformEnumNames processors (#731)). (Also relies on#17ff639f32on Windows MSVC default bundled builds for 64-bit non-zero enums.)"c++20","nvq++","*"), C++ keyword collisions, and enumerators outside the default reflected range via opt-inrfl::EnumNames<E>(overrides+transform) and variadicrfl::get_enum_wire_names<E, Ps...>(). Throwing custom transforms returnrfl::Errorin bothParserEnum::readand publicrfl::string_to_enum.rfl::EnumNames<E>(matchingrfl::Reflector<T>) orrfl::config::enum_names<E>(matchingrfl::config::enum_range<E>/enum_descriptions<E>).#148;NVIDIA/cuda-quantum,moqx/src/auth/Action.h.36.
abc8516e— Addrfl::json::Rawfor passthrough raw JSON values (Score 71 post-polish, Refs #368)rfl::GenericC++ ASTs or modifying any core parser header (out-of-lineRFL_APIinsrc/rfl/json/Raw.cpp,Genericbridge forDefaultVal/to_schema, compile-timestatic_asserton unsupported formats).Raw::from_stringstrict RFC 8259 validated default + explicitRaw::from_trusted_stringopt-in); added const-onlyget()/operator*()/operator()(); switchedfrom_json_objtoyyjson_val_write_opts(..., &err)for descriptive errors; handled moved-from/emptyRaw::to_generic(); updatedstatic_assertmessage to mentionrfl::Generic.slang-server(double-reflecting JSON-RPCparamsthroughrfl::Generic),wolf(escaped JSON string +openapi.cpp:17-69).Items Parked on
discuss/ssot(Below< 65Cutline)None of these belong in
upstream-queuewithout upstream maintainer design sign-off; they remain preserved and cleanly restacked on top ofupstream-queueondiscuss/ssot:discuss/ssotrfl::DefaultTag<Discriminator, Tag>#455precedent preferredstd::variant<TaggedUnion<...>, Fallback>; global discriminator collision &cli/env/msgpackcontract gaps.rfl::Int64AsStringsizeof(long) >= 8portability trap, validator schema interaction.rfl::NoDuplicateKeysjson/Reader.hpp, unapprovedReader-vs-ObjectReadercontract,toml++mismatch. (Standalone YAML non-scalar key bugfix from#160extracted into#13.)rfl::AddNullFieldsrfl::NoOptionals(write-side explicit nulls) andrfl::Nullable<T>; undocumented inprocessors.md.rfl::ErrorKind+Error::code()V::codeopt-in, changesErrorDetail::operator==. (StandaloneOneOf,noexcept, andError::details()bugfixes extracted into#2,#14,#23.)<rfl/nlohmann.hpp>rfl::MaxDepth<N>thread_localglobal counter (DLL/coroutine/nested-read hazards), NTTP template bloat, silent non-enforcement on recursive 3P parsers (yaml-cpp,pugixml,toml++).rfl::Metadata<T>+SchemaName<T>/SchemaExtension<T>Annotated),ExtraFieldson every JSON schema subtype. (StandaloneisalnumUB & Avro/Cap'n Proto unwrap bugfixes extracted into#30,#34.)rfl::AliasDefaultIfMissingschema defaults (#396)#396as "tricky" and suggestedrfl::Genericon#680; 971-LOC dual wrapper-walking traits + breaking output change onDefaultIfMissing.rfl::Nullable<T>/rfl::TriState<T>std::optional/NoOptionals/AddNullFields.rfl::DefaultIfNull(#796)#796, 19 prod files, 3rd wrapper-walking trait (is_nullable.hpp),#786-class sibling-field behavior cliff.is_safe_default_constructibleVerification
upstream-queue(abc8516e):-DREFLECTCPP_STRICT_WARNINGS=ON,-DREFLECTCPP_JSON=ON,-DREFLECTCPP_YAML=ON,-DREFLECTCPP_BUILD_TESTS=ON): 0 warnings, 772/772 passed (1 locale test skipped; includes newgeneric.test_enum_64bit_nonzero).-DREFLECTCPP_STRICT_WARNINGS=ON,-DREFLECTCPP_JSON=ON,-DREFLECTCPP_YAML=ON,-DREFLECTCPP_BUILD_TESTS=ON): 0 warnings, 772/772 passed (1 locale test skipped; includes newgeneric.test_enum_64bit_nonzero).ParserExpected.hpp,env/Reader.hpp, andenchantum.hppverified on both Clang 23 and GCC 13 in both-std=c++20and-std=c++23(-Wall -Wextra -Wextra-semi -Werror,EXPECTED_INACTIVEin C++20 /EXPECTED_ACTIVEin C++23); GCC 13-std=c++23tests/{generic,json}/test_expected.cpppassed 7/7, 0 warnings (__cplusplus == 202100Lpreserved).#15(f49d6c8d):test_extra_fields_key_collisionpasses on Clang 23 & GCC 13 (-Wall -Wextra -Wextra-semi -Werror); 0-bytecompile_stress_wide.cpp.odelta vs#14(4,419,640 B == 4,419,640 B) and 0assign_to_matchinglambdas.sqlgencompatibility (rfl::internal::StringLiteralforwarding across 41 headers): 96/96 passed on both Clang 23.1.6 and GCC 13.4.0.discuss/ssot(0eede77c, restacked cleanly on top ofupstream-queue):-DREFLECTCPP_STRICT_WARNINGS=ON,-DREFLECTCPP_JSON=ON,-DREFLECTCPP_YAML=ON): 0 warnings, 877/877 passed (1 locale test skipped).-DREFLECTCPP_STRICT_WARNINGS=ON,-DREFLECTCPP_JSON=ON,-DREFLECTCPP_YAML=ON): 0 warnings, 877/877 passed (1 locale test skipped).