4 Dec
2019
4 Dec
'19
11:50 p.m.
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
> 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.