From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2019-12-04 23:50:10
On 2019-12-05 02:43, Peter Dimov via Boost wrote:
> Andrey Semashev wrote:
>> I think, fixed_string<0> should be specialized to an empty class. Not
>> that I have a specific use case for fixed_string<0>, but making the
>> class empty in general is useful for EBO and [[non_unique_address]]
>> and e.g. tuples that employ these techniques.
> Since values of the same type can't have the same address, you'll be
> gaining at most one byte per tuple even if you put 1089 fixed_string<0>s
> in it.
Is it so? I thought [[non_unique_address]] was supposed to allow that.
> Although I suppose tuple<unsigned long, fixed_string<0>> can be 8 bytes
> instead of 16.
If such a tuple is e.g. bound into std::function, this may mean a
difference between embedded storage and dynamic memory allocation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk