|
Boost : |
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-04-25 17:35:27
Rene Rivera wrote:
> Stefan Seefeld wrote:
>> Philippe Vaucher wrote:
>>>> Is the format of the output string specified in the
>>>> standard? i.e can I trust that it will be the same from compiler to
>>>> compiler in
>>>> order to use it in cross-platform code?
>>>
>>> No, but I know gcc gives you a demangle function so you can get a proper
>>> name out of it.
>>> If you're really interested I can try to find it.
>> Just look into the implementation of boost.python. Gcc's demangler is
>> used there to produce convenient error / exception text.
>
> Note also that it's not just a compiler to compiler difference in the
> typeid names. They differ from one compiler version to the next compiler
> version. So if you want consistent names, you either create them
> yourself, or use demangling utilities.
Well, it isn't quite as bad as you make it sound. At least now we have
a standard ABI that name mangling is part of:
http://www.codesourcery.com/cxx-abi/abi.html
Regards,
Stefan
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk