Date: Sat, 11 Jan 2025 10:50:10 -0600
Hey all,
Peter and I will have a paper in this upcoming mailing, which can be found
here (https://isocpp.org/files/papers/P3560R0.html). We're proposing that
error handling in reflection should use exceptions to be recoverable, now
that it is possible to have recoverable exceptions during constant
evaluation.
The part that concerns this list is... what type should
std::meta::exception::what() return: std::string_view or
std::u8string_view?
- Argument for u8string_view: this is the principled, type system
correct answer.
- Argument for string_view: this is the only type for which there is
absolutely any support whatsoever in the standard library to do anything.
As you all know, this is an area in which I have no expertise (neither
current nor, if I'm being honest, desired). This discussion will have to go
to SG16 eventually, so I wanted to just expedite the process.
As we point out, P2996 used to originally use string_view everywhere and we
changed to provide a dual interface (e.g. identifier_of() and
u8identifier_of() both exist). That's not really feasible for
std::meta::exception, we kind of have to pick one.
Thanks,
Barry
Peter and I will have a paper in this upcoming mailing, which can be found
here (https://isocpp.org/files/papers/P3560R0.html). We're proposing that
error handling in reflection should use exceptions to be recoverable, now
that it is possible to have recoverable exceptions during constant
evaluation.
The part that concerns this list is... what type should
std::meta::exception::what() return: std::string_view or
std::u8string_view?
- Argument for u8string_view: this is the principled, type system
correct answer.
- Argument for string_view: this is the only type for which there is
absolutely any support whatsoever in the standard library to do anything.
As you all know, this is an area in which I have no expertise (neither
current nor, if I'm being honest, desired). This discussion will have to go
to SG16 eventually, so I wanted to just expedite the process.
As we point out, P2996 used to originally use string_view everywhere and we
changed to provide a dual interface (e.g. identifier_of() and
u8identifier_of() both exist). That's not really feasible for
std::meta::exception, we kind of have to pick one.
Thanks,
Barry
Received on 2025-01-11 16:50:24