This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: wide string template instantiation


David Engberg writes:

> guavac, a free Java bytecode compiler, was written in C++, and uses
> basic_string<unsigned short> to represent 16-bit unicode character
> sequences.  Back in gcc 2.7.3, I used manual template instantiation files
> to create the necessary symbols, but in egcs-1.0.2, I was hoping that the
> new-fangled automatic mechanisms would take care of this.

It does.  The problem is that the needed templates are *not* defined
in the <string> header-file, neither in <std/bastring.h> that it
#includes; they're defined in <std/bastring.cc>.  Although this
separation may speed-up compilation in the normal case, it breaks any
specialization of basic_string but the ones that are compiled into
libstdc++.  IMO, the code in bastring.cc should be moved into
bastring.h.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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