This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11740] ctype<wchar_t>::do_is(mask, wchar_t) doesn't handle multiple bits in mask.
- From: "paolo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2003 19:13:17 -0000
- Subject: [Bug libstdc++/11740] ctype<wchar_t>::do_is(mask, wchar_t) doesn't handle multiple bits in mask.
- References: <20030731090421.11740.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11740
------- Additional Comments From paolo at gcc dot gnu dot org 2003-10-06 19:13 -------
Pétur wrote:
>> This is the rationale: a character *cannot* belong simultaneously to
>> two different values of the ctype_base enum:
>
>It can, for example alpha and upper.
Yes, sorry.
>> That's why do_is must be intended to mean "any".
>
>The only use for this feature that I see is to be able to use
>alnum and graph. ct.is(alnum, c) should return true if c if either
>ct.is(digit, c) is true or ct.is(alpha, c) is true. I can't think of
>any character for which both are true.
Ok. This is the point at the root of my (too general) intuition.
Now... If I understand well you see an inconsistency in the standard
between 22.2.1.1.2 (which we already correctly implement as per your
previous message) and the definitions of alnum == alpha | digit and
graph == alnum | punct, right?