
4 Dec
2019
4 Dec
'19
11:43 p.m.
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. Although I suppose tuple<unsigned long, fixed_string<0>> can be 8 bytes instead of 16. My position here is as it has always been; when an actual user asks for this and provides an actual use case in which it leads to actual measurable benefits, add it. Otherwise, not.