$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-08-30 17:22:44
On Saturday, Aug 30, 2003, at 15:55 America/Denver, Fernando Cacciola
wrote:
> ...
> The pointer-like interface is just about syntax really.
> Instead of opt.value() you type (*opt) or opt->
> This alone shouldn't be a problem.
>
> What I think it is a problem are other design descicions that I made
> in order to make other parts of the interface with the
> pointer-like interface. Namely, the lack of implicit construction and
> direct assignment.
> These two points are raised here by Mat and have been raised by many
> others in the past.
>
> My main argument is that if those were allowed, you could write:
>
> optional<int> opt ;
> opt = 1 ;
> int i = *opt ;
>
> and the assymetry didn't look right to me.
Can't you make *opt=1 work?