libstdc++/93: template class basic_string cannot be instantiated with types other than <char>
Benjamin Kosnik
bkoz@redhat.com
Wed Oct 4 11:07:00 GMT 2000
The following reply was made to PR libstdc++/93; it has been noted by GNATS.
From: Benjamin Kosnik <bkoz@redhat.com>
To: joel@quoininc.com
Cc: libstdc++-gnats@sourceware.cygnus.com
Subject: Re: libstdc++/93: template class basic_string cannot be instantiated with types other than <char>
Date: Wed, 4 Oct 2000 11:06:53 -0700 (PDT)
> >Number: 93
> >Category: libstdc++
> >Synopsis: template class basic_string cannot be instantiated with types other than <char>
> const charT* c_str () const
> { if (length () == 0) return ""; terminate (); return data (); }
A couple of things:
1) libstdc++-v3 has a working wstring class
2) libstdc++-v3 has a conformant string class, so that things like
# include <string>
typedef std::basic_string<short> sstring;
template class std::basic_string<short>;
work.
I suggest you use this library if you're interested in this kind of
functionality.
-benjamin
More information about the Libstdc++-prs
mailing list