Boost logo

Boost :

Subject: Re: [boost] optional<optional<T>>
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-09-02 22:52:49

On Wed, Sep 2, 2009 at 8:43 PM, Andrei
Alexandrescu<andrei_at_[hidden]> wrote:
> Hello,
> I'm defining an "optional" type for D's standard library modeled similarly
> to Boost.optional. An interesting question came up - should
> optional<optional<T>> fold itself into optional<T>, or is "double optional"
> an interesting concept of its own?
> I thought I'd ask here because by now there's a significant body of
> experience with optional<T>. I perused the online documentation and the
> forum and couldn't find information about that specific detail.

Personally I would find it interesting as it can hold extended data,
but perhaps it would be nice to fold someway so it takes less data,
perhaps one bit per sub-optional used up to the overall max of a char
or int or something (would anyone really have 8 optionals embedded?)

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