https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109891
--- Comment #3 from Michel Morin <mimomorin at gmail dot com> --- >From the safety point of view, I agree with you. But, at the same time, I thought that detectable UB (with the help of sanitizers) is useful than silent bug. How about `throw`ing as in std::string's constructor?