From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Kanze To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/4458: std::ctype::is doesn't call do_is as required by ISO 14882 Date: Sun, 14 Oct 2001 13:16:00 -0000 Message-id: <20011014201602.2624.qmail@sourceware.cygnus.com> X-SW-Source: 2001-10/msg00293.html List-Id: The following reply was made to PR libstdc++/4458; it has been noted by GNATS. From: James Kanze To: Martin Sebor Cc: gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/4458: std::ctype::is doesn't call do_is as required by ISO 14882 Date: 14 Oct 2001 22:16:52 +0200 Martin Sebor writes: |> kanze@gabi-soft.de wrote: |> > >Number: 4458 |> > >Category: libstdc++ |> > >Synopsis: std::ctype::is doesn't call do_is as required by ISO 14882 |> It's not required to do so for efficiency (see 22.2.1.3.2, p5). §22.2.1.1.1/1: concerning std::ctype<>::is: Returns: do_is(m,c) Can't be any clearer than that. The function do_is is required by the standard to be virtual, which means that the actual function called (and thus the actual semantics of the function is) depend on the dynamic type of the object. This is, after all, the whole point behind defining the protected virtual functions -- any other interpretation, and having the protected interface makes sense. -- James Kanze mailto:kanze@gabi-soft.de Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(0)179 2607481