https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-12-05 Ever confirmed|0 |1 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think we can simply hoist the code out into a helper function and then overload that for the common char_traits<char> and char_traits<wchar_t> cases, where we know the char_traits doesn't do anything funky and we can forward to optimized libc calls. The generic version can't do that.