[Bug libstdc++/71500] regex::icase only works on first character in a range

timshen at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 11 18:19:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71500

--- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> ---
(In reply to Michael Duggan from comment #3)
>     regex re1 = regex("[T-f]+", regex::icase);

This regex actually doesn't compile in Boost, since boost interpret icase as
"transforming [T-f] to [t-f]", then throw an invalid range exception. libstdc++
with my previous change treat [t-f] as an empty range, which doesn't do harm,
but it'd better throw an exception.

I haven't try MSVC or libc++.


More information about the Gcc-bugs mailing list