|
Boost : |
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2019-12-04 15:12:46
Peter Dimov <pdimov_at_[hidden]> wrote:
> Krystian Stasiowski wrote:
>
>> - Empty class specialization for N = 0: Implemented
>
> I don't like this change. A special case for close to zero benefit that
> changes the semantics of data() to not be unique per instance.
I would hope to see close to the same semantics as std::array<T,0>,
which I believe allows data() to return nullptr.
> Storing the size (as capacity - size) in the last char for N < 256 will have
> more impact, but I'm not sure that it too is worth the added complexity.
Why the last char, rather than always having the size
(of whatever appropriate type) first? Is the idea that
this makes data() and c_str() essentially no-ops? I guess
the benefit of that depends on how often you need empty()
or size() vs. data() or c_str(). Or is there some other
issue?
Regards, Phil.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk