[cfe-dev] Bug in libc++

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 21 08:19:52 PDT 2017


Hi Aleksandr,

On 21 August 2017 at 06:54, Aleksandr via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>     std::regex RE("[^\\W]");

I think libc++ is correct. C++11 defines \W as being equivalent to
[^_[:alnum:]], which means your regex is "[^[^_[:alnum:]]]". I believe
that'll be parsed as "some weird character followed by ]]".

Cheers.

Tim.



More information about the cfe-dev mailing list