This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: Why generic definitions of char_traits were removed from libstdc++3?


Hi,
Will this situation be changed in future libstdc++? If the generic definitions of char_traits will come back into libstdc++?
Thank you very much.

James Su

Gabriel Dos Reis wrote:

James Su <suzhe@gnuchina.org> writes:

Hi,

| Hello,
| Recently, I moved one of my projects from gcc-2.95.3 to gcc-3.2 and | my project cannot successfully compiled anymore. The reason is the | generic definitions of char_traits were removed from libstdc++3, and my | project uses basic_string<unsigned long>.

Hmm, how bad...

| How can I resolve this problem?

There were several discussions about this issue. You might want to
read the thread around
http://gcc.gnu.org/ml/libstdc++/2002-08/msg00096.html

| Can I define char_traits<unsigned long> within my program?

You can do that, but then technically you're invoking an undefined
behaviour. There is no gurantee that it will work with other
standard library implementations or future versions of V3.

| And how
| can I maintain compatiblity of my | program under deferent environments?

See the other messages of Benjamin's and mine in the thread around

http://gcc.gnu.org/ml/libstdc++/2002-08/msg00260.html

for possible ways to maintain compatibility within V3 and other
vendors.

-- Gaby






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