[libcxx] basic_regex: add traits_type, string_type

Summary:
In the synopsis in C++11 subclause 28.8 [re.regex], `basic_regex` is
specified to have member typedefs `traits_type` and `string_type`. This
change adds them to libc++.

Reviewers: mclow.lists, rsmith, hubert.reinterpretcast

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22698

Patch by Jason Liu!

llvm-svn: 277526
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: ac98d5980279c9faf5a2d581c32dfa57832d1639
diff --git a/include/regex b/include/regex
index 1139d8f..b223e63 100644
--- a/include/regex
+++ b/include/regex
@@ -127,6 +127,8 @@
 public:
     // types:
     typedef charT                               value_type;
+    typedef traits                              traits_type;
+    typedef typename traits::string_type        string_type;
     typedef regex_constants::syntax_option_type flag_type;
     typedef typename traits::locale_type        locale_type;
 
@@ -2475,6 +2477,8 @@
 public:
     // types:
     typedef _CharT                              value_type;
+    typedef _Traits                             traits_type;
+    typedef typename _Traits::string_type       string_type;
     typedef regex_constants::syntax_option_type flag_type;
     typedef typename _Traits::locale_type       locale_type;