Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-03-12 14:27:29


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk