std::regex r(R"((x*)\s+(?!\1).+)");
jak sie skompiluje z -stdlib=libc++
https://godbolt.org/z/vPqWaEhGc
libc++abi: terminating with uncaught exception of type std::__1::regex_error: The expression contained an invalid back reference.
wersja z -stdlib=libstdc++
nie ma problemów https://godbolt.org/z/8Gj1h3M3K
Pojawiło mi się jak w clang chciałem uzyc takiego projektu https://github.com/jeremy-rifkin/libassert