Repository navigation
Accept std::string_view in rfl::string_to_enum - #76
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
This was referenced Nov 29, 2026
clockblocker
force-pushed
the
enum-string-view
branch
from
December 1, 2026 06:05
29a59e2 to
2661366
Compare
This was referenced Dec 2, 2026
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: munich-data-engineering/reflect-cpp#802 · Addresses munich-data-engineering/reflect-cpp#565
Problem
rfl::string_to_enumrequiredconst std::string&, forcing callers with astd::string_viewto allocate.Its numeric fallback also relied on
std::stoi, which silently accepted trailing junk ("1abc") and failed on 64-bit enums.Summary
std::string_viewacross public and C++20/C++26 enum-parsing helpers while remaining source-compatible withstd::stringandconst char*.std::stoiand allocating flag splitting with full-widthstd::from_chars, dropping an unused<sstream>include.Consumer Impact
NVIDIA/cuda-quantumTarget/Reflection.h#L61-L65string_view.munich-data-engineering/sqlgenParser_default.hpp#L52-L57rfl::string_to_enumdirectly on row values.For Agents
upstream-queue(a41fc8c9) · Score92/100(S=29,M=28,D=23,R=12) ·+49/-20(4f)queue-tests/generic/test_string_to_enum.cpp