Boost logo

Boost :

Subject: Re: [boost] optional<optional<T>>
From: Edward Diener (eldiener_at_[hidden])
Date: 2009-09-03 00:01:14


Andrei Alexandrescu 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.

Why make optional<optional<T> > an exception to the normal case ? Even
if you imagined no practical use for it, that's no reason to create a
one-off situation.


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