Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'
llvm-svn: 209307
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 9393b5113ba85474b08be0647eed95572863c251
diff --git a/include/regex b/include/regex
index 26ade48..bebbaf0 100644
--- a/include/regex
+++ b/include/regex
@@ -4541,6 +4541,13 @@
__push_char(_CharT(__sum));
++__first;
break;
+ case '0':
+ if (__str)
+ *__str = _CharT(0);
+ else
+ __push_char(_CharT(0));
+ ++__first;
+ break;
default:
if (*__first != '_' && !__traits_.isctype(*__first, ctype_base::alnum))
{