[LLVMbugs] [Bug 18501] New: regex doesn't allow custom traits::char_class_type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 15 20:51:45 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18501

            Bug ID: 18501
           Summary: regex doesn't allow custom traits::char_class_type
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: cubbimew at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Although the result of __traits_.lookup_classname() is saved in a
char_class_type variable, __bracket_expression assumes that it must be type-
and value-compatible with ctype_base::mask, so it's OR'd into a
ctype_base::mask variable (see  __bracket_expression::__add_class()), and the
resulting ctype_base::mask, NOT a char_class_type, is what's passed into
__traits_.isctype().

This makes it impossible to provide regex traits that handle custom character
classes (e.g. locale-specific wctype classifications or Unicode classes a-la
boost or anything else beyond ctype_base::mask's meager selection).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140116/602e53bf/attachment.html>


More information about the llvm-bugs mailing list