|
Boost : |
Subject: Re: [boost] [optional] Thoughts on disallowing assignment for wrapped references.
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-09-03 23:34:41
On Sat, Sep 3, 2011 at 7:55 PM, Mostafa <mostafa_working_away_at_[hidden]>wrote:
[...]
> Aren't we all? But there are differing notions of consistency floating
> around. I'm motivated by consistency for the assignment operator of
> optional<T&>, Fernando's motivated by consistency of programming w.r.t. to
> template programming and use of optional in general. And as Fernando
> pointed out, it may not be possible to satisfy all these notions
> simultaneously. My thought was, and continues to be that if all these
> notions of consistency can't be satisfied simultaneously, then instead of
> satisfying some fully and others partially, why not just disallow those
> operations that are partially consistent. Or more specifically, what are
> the implications of just disallowing those operations that are partially
> consistent?
>
One implication would be a breaking of existing code. Another implication
would be greater difficulty in using optional<T> in a generic context when T
could be a reference type.
- Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk