From: Carlo Wood (carlo_at_[hidden])
Date: 2002-08-30 09:47:09
On Fri, Aug 30, 2002 at 03:54:03PM -0400, Toon Knapen wrote:
> why not
> void demangle(std::string& o, const std::type_info& i)
> to avoid the C-style argument overloading.
Because typeid().name() returns a 'char const*'.
It makes no sense to force people to first copy
that into a string before they can demangle it.
We can always provide a wrapper, given a std::string,
that passes the data to the demangler.
Perhaps the best interface for the most general one
is to make the library accept both, zero terminated
input as well as a given length. Then we can pass
a C style string but also a std::string directly
(without the need for a copy) by passing its length.
I hate copying strings :)
-- Carlo Wood <carlo_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk