https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71500
Tim Shen <timshen at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john at johnmaddock dot co.uk --- Comment #10 from Tim Shen <timshen at gcc dot gnu.org> --- (In reply to Michael Duggan from comment #9) > I will make two suggestions. The initial suggestion is simple enough: > Given that regex_traits is mandated to be implemented by the library for > char and wchar_t, it would be reasonable, I think, to make the > specializations that handled these that go ahead and use the locale. > This falls into the "as if" rule, where an implementation is fine as > long as it works "as if" the more correct way was implemented. > The other suggestion is this. Given that the more correct is "terribly > inefficient and impractical", I posit that you have three options: Use > the "correct", but "bad", implementation, leave the "incorrect in all > cases" implementation in place, or just go ahead and use the locale to > implement toggle_case(). Of these three, I think the "incorrect in all > cases" option is the worst of all worlds. In long term I think "toggle_case" or its equivalent should be specified by the user-defined traits. I think we can use my toggle_case for now. I'll post a new patch to reflect the discussion. I'll only post the patch after we have an agreement, since I shouldn't bother the reviewer (sorry Jon!) too frequently. :P > (It wouldn't be a bad idea to poke the original authors of the regex > functionality to see what they think. Apologies in advance if you were > one of the authors.) CC'ed John Maddock, the author of Boost.Regex. :)