summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2016-08-02 21:34:48 +0000
committerHubert Tong <hubert.reinterpretcast@gmail.com>2016-08-02 21:34:48 +0000
commitac98d5980279c9faf5a2d581c32dfa57832d1639 (patch)
treed22ec5ccc7b30ef2bcd238582f58415291a99567 /libcxx/test/std
parentb2738e41bf494f7b4e2daa2524b3904844a49de2 (diff)
downloadbcm5719-llvm-ac98d5980279c9faf5a2d581c32dfa57832d1639.tar.gz
bcm5719-llvm-ac98d5980279c9faf5a2d581c32dfa57832d1639.zip
[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
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/re/re.regex/types.pass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/std/re/re.regex/types.pass.cpp b/libcxx/test/std/re/re.regex/types.pass.cpp
index 5c0a5920d20..2e48b4e841c 100644
--- a/libcxx/test/std/re/re.regex/types.pass.cpp
+++ b/libcxx/test/std/re/re.regex/types.pass.cpp
@@ -15,6 +15,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;
@@ -25,11 +27,15 @@
int main()
{
static_assert((std::is_same<std::basic_regex<char>::value_type, char>::value), "");
+ static_assert((std::is_same<std::basic_regex<char>::traits_type, std::regex_traits<char> >::value), "");
+ static_assert((std::is_same<std::basic_regex<char>::string_type, std::basic_string<char> >::value), "");
static_assert((std::is_same<std::basic_regex<char>::flag_type,
std::regex_constants::syntax_option_type>::value), "");
static_assert((std::is_same<std::basic_regex<char>::locale_type, std::locale>::value), "");
static_assert((std::is_same<std::basic_regex<wchar_t>::value_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::basic_regex<wchar_t>::traits_type, std::regex_traits<wchar_t> >::value), "");
+ static_assert((std::is_same<std::basic_regex<wchar_t>::string_type, std::basic_string<wchar_t> >::value), "");
static_assert((std::is_same<std::basic_regex<wchar_t>::flag_type,
std::regex_constants::syntax_option_type>::value), "");
static_assert((std::is_same<std::basic_regex<wchar_t>::locale_type, std::locale>::value), "");
OpenPOWER on IntegriCloud