From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29708 invoked by alias); 6 Oct 2003 19:13:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29699 invoked by uid 48); 6 Oct 2003 19:13:17 -0000 Date: Mon, 06 Oct 2003 19:13:00 -0000 Message-ID: <20031006191317.29698.qmail@sources.redhat.com> From: "paolo at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030731090421.11740.peturr02@ru.is> References: <20030731090421.11740.peturr02@ru.is> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/11740] ctype::do_is(mask, wchar_t) doesn't handle multiple bits in mask. X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg00413.txt.bz2 List-Id: 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?