HomePhabricator

[libc++] Keep __regex_word in sync with ctype_base

Authored by miyuki on Jun 14 2019, 2:04 AM.

Description

[libc++] Keep __regex_word in sync with ctype_base

Summary:
The class ctype_base in the header <locale> contains masks for
character classification functions, which are kept in sync with
platform's C library, hence it contains many special cases.
The value of the bit mask
regex_word in the header <regex> must not
clash with those bit masks.

Currently the default case (i.e. unknown platform/C library) is
handled incorrectly: the __regex_word clashes with ctype_base::punct.

To avoid replicating the whole list of platforms in <regex> this patch
defines regex_word in <locale>, so that it is always kept in sync
with other masks.

Reviewers: ldionne, mclow.lists, EricWF

Reviewed By: ldionne

Subscribers: krytarowski, christof, dexonsmith, pbarrio, simon_tatham, libcxx-commits

Tags: #libc

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

llvm-svn: 363363

Details

Committed
miyukiJun 14 2019, 2:04 AM
Reviewer
ldionne
Differential Revision
D63284: [libc++] Keep __regex_word in sync with ctype_base
Parents
rG796ed03b8412: [C++20] add Basic consteval specifier
Branches
Unknown
Tags
Unknown