summaryrefslogtreecommitdiffstats
path: root/src/regex.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-07 21:08:01 +0000
committerdim <dim@FreeBSD.org>2015-01-07 21:08:01 +0000
commit083c980732b44eb899ce399cf182dec9b90b9a1d (patch)
tree41f38760e19d47a9e21d0f64ece2bddaaab8aaf7 /src/regex.cpp
parentc3e10da3dc0f616b78ccf85206fdcf4c92f8ac85 (diff)
downloadFreeBSD-src-083c980732b44eb899ce399cf182dec9b90b9a1d.zip
FreeBSD-src-083c980732b44eb899ce399cf182dec9b90b9a1d.tar.gz
Vendor import of libc++ trunk r224926:
https://llvm.org/svn/llvm-project/libcxx/trunk@224926
Diffstat (limited to 'src/regex.cpp')
-rw-r--r--src/regex.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/regex.cpp b/src/regex.cpp
index e3ec281..17dd6ea 100644
--- a/src/regex.cpp
+++ b/src/regex.cpp
@@ -69,8 +69,10 @@ regex_error::~regex_error() throw() {}
namespace {
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
+#endif
struct collationnames
{
@@ -78,7 +80,9 @@ struct collationnames
char char_;
};
+#if defined(__clang__)
#pragma clang diagnostic pop
+#endif
const collationnames collatenames[] =
{
@@ -195,16 +199,20 @@ const collationnames collatenames[] =
{"zero", 0x30}
};
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
+#endif
struct classnames
{
const char* elem_;
- ctype_base::mask mask_;
+ regex_traits<char>::char_class_type mask_;
};
+#if defined(__clang__)
#pragma clang diagnostic pop
+#endif
const classnames ClassNames[] =
{
@@ -246,12 +254,12 @@ __get_collation_name(const char* s)
return r;
}
-ctype_base::mask
+regex_traits<char>::char_class_type
__get_classname(const char* s, bool __icase)
{
const classnames* i =
_VSTD::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp());
- ctype_base::mask r = 0;
+ regex_traits<char>::char_class_type r = 0;
if (i != end(ClassNames) && strcmp(s, i->elem_) == 0)
{
r = i->mask_;
OpenPOWER on IntegriCloud