This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: char_traits patch, round two
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, libstdc++ at gcc dot gnu dot org, Ruediger Oertel <ro at suse dot de>
- Date: 12 Aug 2002 13:50:28 +0200
- Subject: Re: char_traits patch, round two
- Organization: CodeSourcery, LLC
- References: <200207290741.g6T7f7X26915@fillmore.constant.com> <hod6somizg.fsf@gee.suse.de>
Andreas Jaeger <aj@suse.de> writes:
| Benjamin Kosnik <bkoz@redhat.com> writes:
|
| > ..still pending. There are some issues left to resolve: hopefully
| > these will fall into place after a good nights sleep...
|
| Since this patch is on the gcc 3.2 branch, I get now errors like:
| ../src/.libs/libid3.so: undefined reference to `std::char_traits<unsigned char>::move(unsigned char*, unsigned char const*, unsigned long)'
Weird. Where is that symbol referenced from?
| > 2002-07-28 Benjamin Kosnik <bkoz@redhat.com>
| > Gabriel Dos Reis <gdr@nerim.net>
| >
| > XXX char_traits vs. other _traits
| > XXX money_ bits
| > XXX num_get/num_put bits
| > XXX testsuites
| > * include/bits/char_traits.h: Remove generic definitions.
|
| [...]
|
| The final ChangeLog contains:
| * testsuite/21_strings/capacity.cc: Add char_traits specializations.
|
| Do I need to add those specializations now everywhere?
For anything other than char or wchar_t, the pedantical answer is
yes. Furtermore, if the template-argument value for charT is not a
user-defined-type, then pedantically speaking you can't add a
specialization for char_traits<> in std:: -- which basically makes
char_traits<> useless in its current form, but I guess that is another
debate. However, I suspect GCC won't reformat your hard drive just
because you added the specialization char_traits<unsigned char> in
std:: :-).
| What's the right way to fix this problem?
I'm curious: How did you manage to reference std::char_traits<unsigned
char>::move()? I'm asking that because, depending on the context you
would have to specialize other things as well...
-- Gaby