This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/4458
- To: nobody at gcc dot gnu dot org
- Subject: Re: libstdc++/4458
- From: Martin Sebor <sebor at roguewave dot com>
- Date: 14 Oct 2001 21:06:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Martin Sebor <sebor at roguewave dot com>
The following reply was made to PR libstdc++/4458; it has been noted by GNATS.
From: Martin Sebor <sebor@roguewave.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
kanze@gabi-soft.de, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: libstdc++/4458
Date: Sun, 14 Oct 2001 15:02:40 -0600
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4458&database=gcc
|> 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.
No, you're quoting the requirement on the primary template, but your
issue (titled std::ctype<char>::is ...) is with the specialization on
char. The requirement I referred you to in 22.2.1.3.2, p5 is the one
that's relevant here. The reason for not calling the virtual function
from the ctype<char>::is() is, as I said earlier, for efficiency.
Regards
Martin