This is the mail archive of the
libstdc++-prs@sources.redhat.com
mailing list for the libstdc++ project.
Re: libstdc++/93: template class basic_string cannot be instantiated with types other than <char>
- To: nobody at sourceware dot cygnus dot com
- Subject: Re: libstdc++/93: template class basic_string cannot be instantiated with types other than <char>
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: 4 Oct 2000 18:07:00 -0000
- Cc: libstdc++-prs at sourceware dot cygnus dot com,
- Reply-To: Benjamin Kosnik <bkoz at redhat dot com>
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