From: Robert Bell (belvis_at_[hidden])
Date: 2004-04-02 13:43:37
Gennadiy Rozental wrote:
>>There's nothing wrong with that. It is std::basic_string's
>>interface that provides for the use of a policy class. That
>>std::char_traits happens to be the most appropriate -- it rarely
>>isn't -- implementation of that policy is beside the point. You
>>can argue that std::basic_string shouldn't have such a policy
>>parameter, and you'd probably be right, but that's not
> That's right. It's basic_string fault, which should've used char_traits by
> name in basic_string implementation.
I don't want to turn this into a std::string discussion, but if
basic_string used char_traits by name, how would you define two
different string types using char*, one with case-sensitive comparison
and one without? With basic_string the way it is, it's possible; the way
you're proposing, I don't see how to do it.
There are lots of problems with basic_string, but
template<typename T, typename traits = xxx<T> >
isn't one of them.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk