|
Boost : |
Subject: Re: [boost] compact_optional -- prompting interest
From: AgustÃn K-ballo Bergé (kaballo86_at_[hidden])
Date: 2015-09-27 17:30:39
On 9/27/2015 6:12 PM, Andrey Semashev wrote:
> On 27.09.2015 23:45, Matt Calabrese wrote:
> As much as I like the idea of reusing the
> storage for discriminator, this just feels too fragile to me. Maybe if
> there was a safer interface for supporting intrusive_optional in user
> defined types it wouldn't feel that way.
I toyed with an `intrusive_optional<T>` several years ago. It required
`T` be constructible from and equality-comparable to
`intrusive_optional_tag`. This tag could only be constructed by
`intrusive_optional`.
Regards,
-- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk