Re:Const all the things?
by BoorishBears on Monday January 24, 2022 @10:41AM
(#30058983)
Is there something wrong with this?
[ Parent
| on HN ]
Hmm, is it error, value or value, error? In this situation, I'd prefer something like std::optional or std::variant, which you can't get wrong as easily as swapping two variables in a structured bind.
Those have their problems too, though, and I'd never claim std::variant is "nice" to use.