Boost logo

Boost :

Subject: Re: [boost] [optional] generates unnessesary code for trivial types
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-02-13 16:19:30

On Mon, Feb 13, 2012 at 9:51 PM, Andrzej Krzemienski <akrzemi1_at_[hidden]> wrote:
> Certainly, there ways to make the output of optional configurable. I am not
> sure manipulators would be my preference. An alternative would be the
> approach that Boost.Date_time has adopted: you set your preference per
> stream (plus one global setting) by means of locale mechanism. However,
> when it comes to proposing stuff in front of the ISO committee, there is
> one other factor, which I failed to mention yet. It is the "fragility" of
> the process. I am concerned that if anything turns out to be controversial,
> the whole Optional would be at risk of being rejected. This might be an
> exaggeration (I have never gone through the process of proposing something
> and then pushing it through), but Optional has already been proposed by
> Fernando (
> and rejected; primarily for two things: operators -> and * and the
> semantics for optional reference assignment (see
> I would much like
> to avoid the situation where Optional (which I believe is very useful to
> wide variety of programmers) would be rejected because of one additional,
> however tiny, controversy of streaming operator.

I think the safe option is to not include it. Same for references.
What's the problem with the ptr interface? Seems fine with me.


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