Affiliations
Projects
Talks & podcasts
WG21 papers
Blog posts
Other activity
- Merged PRFix rfl::DefaultVal in NamedTuples and TaggedUnion schemas
Why rfl::DefaultVal is the documented way to give a field a default, and it should work wherever reflect-cpp reads or describes a struct. On main it crashes to_schema for an rfl::TaggedUnion and reads an rfl::NamedTuple field that was…
reflect-cpp#786 · by clockblocker - Merged PRAccept const argv and ranges of arguments in rfl::cli::read
AI-authored Why Boost.Program_options, CLI11 and cxxopts take const char* const* argv, and Boost.Program_options and CLI11 also take a std::vector . #623 asks for both in rfl::cli. Today a const char argv needs a const_cast, and arguments…
reflect-cpp#784 · by clockblocker - Merged PRDon't assign to const fields when reading a struct with defaults
AI-authored A struct with a rfl::DefaultVal field and a const field whose type has no assignment operator doesn't compile on main: cpp struct Point { // const members, so no assignment operator const int x = 0; const int y = 0; }; struct…
reflect-cpp#787 · by clockblocker - Merged PRWrite optional fields wrapped in rfl::Short or rfl::Positional
Problem Currently, using rfl::json::write fails to compile (valid forrfl::cli::read) structs with optional fields wrapped in rfl::Short or rfl::Positional: c++ // mytool [-o FILE] [INPUT] struct Args { rfl::Short > output; rfl::Positional…
reflect-cpp#785 · by clockblocker - Merged PRRead a bare negative number such as `-5` as a positional argument in rfl::cli
Why In rfl::cli an rfl::Positional can't take a negative number: -5 fails with Unknown short argument: -5. argparse reads -5 as a positional argument unless the parser declares an option that looks like a negative number, and clap has an…
reflect-cpp#783 · by clockblocker - Merged PRUpdate a DefaultVal test to the error message from #779
AI-authored json.test_default_val_throwing_initializer_is_an_error_when_reading came in with #778 and expects the bare validator message. #779, merged the same day, puts Could not default-construct ..., which is required because it…
reflect-cpp#782 · by clockblocker