From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-12-04 23:43:11
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk