
12 Mar
2006
12 Mar
'06
7:27 p.m.
Mikael Lind wrote:
Is there any reason why you cannot do:
optional<int> o; int i = o ? *o : 123;
I think it's a common usecase that the optional is a temporary, like a function return value, so you can't refer to it twice in a single expression. Sebastian Redl