Part of #515. Depends on Phase 3 being complete (as precedent, not a hard
technical dependency).
Scope
Convert FPType from a plain enum class to MSTD_ENUM, and migrate the
floating_point_type key in generalInputParser.
Real gotcha, not hypothetical: the accepted input tokens are
"float"/"double" -- both reserved C++ keywords, so they cannot be
literal enumerator names. Use non-colliding identifiers (e.g. flt/dbl)
and a customParser mapping the real input tokens to them:
customParser = [](std::string_view raw) -> std::optional<FPType>
{
if (raw == "float") return FPType::flt;
if (raw == "double") return FPType::dbl;
return std::nullopt;
};
Single key -- no reason to split enum conversion and key migration into
separate PRs here.
Acceptance criteria
Risk
Low-moderate -- the naming workaround needs to be gotten right, but blast
radius is one key.
Part of #515. Depends on Phase 3 being complete (as precedent, not a hard
technical dependency).
Scope
Convert
FPTypefrom a plainenum classtoMSTD_ENUM, and migrate thefloating_point_typekey ingeneralInputParser.Real gotcha, not hypothetical: the accepted input tokens are
"float"/"double"-- both reserved C++ keywords, so they cannot beliteral enumerator names. Use non-colliding identifiers (e.g.
flt/dbl)and a
customParsermapping the real input tokens to them:customParser = [](std::string_view raw) -> std::optional<FPType> { if (raw == "float") return FPType::flt; if (raw == "double") return FPType::dbl; return std::nullopt; };Single key -- no reason to split enum conversion and key migration into
separate PRs here.
Acceptance criteria
"float"/"double"input tokens resolve correctly via thecustomParseralias.floating_point_typepass unchanged.parseFloatingPointTypeandfpTypeFromString/string(FPType)deleted in this PR once unreferenced elsewhere.
Risk
Low-moderate -- the naming workaround needs to be gotten right, but blast
radius is one key.