https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68276
--- Comment #4 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- The current approach still needs to catch bad_new_array_length exceptions. That is intended to be solved by http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1992 so once we get to stage 1 for gcc 7, we can tune this further. I'll open a new enhancement PR for that and link this one to it.