On 03/04/19 23:32 +0300, Antony Polukhin wrote:
Looks good. Covers most of the use cases.
Please consider adding filesystem::path, pair, tuple, string_view?,
string_view is trivially_copyable, and < 256 bytes, so works
automatically.
error_code, list, deque (myabe all the other containers), optional, variant
itself (for cases when variant holds another variant).
I hadn't thought about error_code and recursive variants, I'll check
those can be made to work.
filesystem::path had occurred to me, but I'm undecided.
pair, tuple and optional I think can be done as shown in my email.
It would be very useful for the _Never_valueless_alt to return true for
aggregates that hold only never valueles types. Not sure that there is a
compiler builtin for getting all the aggregates types, but it could be
implemented via metaprogramming.
Useful, but not essential.
This is a Quality of Implementation issue, and the cases where an
exception actually gets thrown and leaves the variant valueless are
going to be rare anyway. The codegen benefits of being never-valueless
are minor.
So I don't think we need to go too wild doing this.
When is the ABI freeze for the C++17 additions?
The GCC 9 release, ideally.