2 ms·
Yeah, outside of templates it probably makes sense just to stick to if-style syntax. It's not any more verbose than the for-loop syntax. if (x.has_value()
by loeg 1y ago
Yeah, outside of templates it probably makes sense just to stick to if-style syntax. It's not any more verbose than the for-loop syntax.
if (x.has_value()) {
doSomething(*x);
}