Boost logo

Boost :

Subject: Re: [boost] [optional] generates unnessesary code for trivial types
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-02-11 20:32:16

on Thu Feb 09 2012, Andrzej Krzemienski <> wrote:

> I am
> thinking of disabling the assignment not because I think it does not belong
> to references, but because there are two ways of implementing it, and
> implementing it either way would surprise a different group of
> programmers.
> And this would be a "run-time surprise". Instead my choice (not necessarily
> the best one) is to provide a "compile-time surprise".

If value semantics are achievable for this kind of optional, I think
it's better to supply that and let the people who don't expect value
semantics be surprised at runtime.

IMO-ly y'rs,

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at