This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Implement regex_traits::lookup_classname


Instead of just fixing libstdc++/45990 by applying the proposed
resolution of LWG 1337 I thought I'd have a go at providing the
missing implementation of lookup_classname.

Comments would be welcome, especially regarding the fact that the WP
talks about using bitwise or in regex_traits::isctype, whereas if
char_class_type is a Bitmask Type then testing whether the "w" and
"blank" elements are set requires using bitwise and, or am I missing
something?

Because we have different values of the ctype_base::mask elements on
different platforms, it's not trivial to simply define two more
constants for the "w" and "blank" because we don't know which bits
might be used already by ctype_base::mask.  So I chose to use a 64-bit
type, with the lowest two bits for the new bitmask elements and the
rest of the value contains a ctype_base::mask value left-shifted by
two bits.

Jonathan

Attachment: re_isctype.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]