This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Re: implementation of ctype facet


On Mon Dec 20 1999, 15:33, Benjamin Kosnik <bkoz@cygnus.com> wrote:

> > in bits/locale_facets.h, and I'm surprised to see empty definitions with
> > the following comment in each:
> > 
> >    // XXX Need definitions for these abstract mf's.
> > 
> > Section 22.2.1.1.2 of the C++ standard specifies effects and return
> > values for each of the virtual functions in the general case, so I
> > assumed that real definitions would be required.

[...]

> Anyway: look at 22.1.1.1.1 in the "Required Instantiations" table.
> 
> ctype<char>, ctype<wchar_t>

[...]

> (table 52 includes ctype_byname<char>, ctype_byname<wchar_t>)
> 
> We provide specializations for the above. We dont' profvide the general
> case, as you've noticed. I don't think this is a big deal.

Is there an advantage to providing empty definitions over simply having
declarations?

It seems that a user could still specialize the templates, but is it
really standard-conforming to have definitions that don't comply with
the effects specified in the standard, or even return the appropriate
types?

Maybe I misunderstood the comment.  At first I took it to mean that a
user is responsible for defining the function if needed.  Does it mean
that the definitions are work remaining to do in the library?

Thanks.
-- 
Matt McClure
Concurrent Computer Corporation

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