Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-03-26 13:54:18

Jonathan Turkanis wrote:
> This is probably the best characterization of the traits/policy
> distinction I've heard. I don't agree entirely about basic_string,
> however; I think that the comparison functions such as
> char_traits::compare have to be made available through template
> parameters, otherwise you wouldn't be able to reuse basic_string if
> you want strings with different comparison criteria.

I thought it was already common knowledge that the idea of using the
'char_traits' policy parameter of basic_string to override comparisons is
inherently flawed. Usually the kind of comparison you want depends on the
context where the string is used, not on the type of the string.

Boost list run by bdawes at, gregod at, cpdaniel at, john at