From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-08-30 09:51:21
On Friday 30 August 2002 10:32 am, Fernando Cacciola wrote:
> Why is it that much important for this particular library not to resort to
> the internal default string allocation.
Carlo has a great reason for that: he needs to run demangle_type from
> Whatever it is, is preventing the simpler interface:
> std:.string demangle_type(char const* input);
> which IMO is a lot much user-friendly.
I agree fully. Why not keep the user-friendly interface and add an overload
with an allocator parameter?
std::basic_string<char, std::char_traits<char>, Allocator>
demangle_type(const std::type_info& type, const Allocator& allocator);
// simpler non-template versions use the default allocator
std::string demangle_type(const std::type_info& type);
// also provide overloads where the first parameter is an std::string or
// const char*
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk