3 ms·
> and you can't probably use variant either, since using variant would introduce yet another possible state (e.g. if an exception gets thrown..). Variants are
by leni536 7y ago
> and you can't probably use variant either, since using variant would introduce yet another possible state (e.g. if an exception gets thrown..).
Variants are excellent for a state machine. valueless_by_exception is pretty much irrelevant if your states' relevant constructors and assignments are nothrow.
- fluffything 7y agoC++ variants are horrible for state machines, since they are not affine types.