Specializations of std::char_traits
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Jul 18 11:23:00 GMT 2003
Matt Austern <austern@apple.com> writes:
| 2. I deliberately avoided standard algorithms like std::copy and
| std::fill_n. Rationale: at present, bits/char_traits.h is almost
| self-contained. It depends on <cstring> and bits/fpos.h and nothing
| else. I don't want to introduce a new dependence unless there's a
| very strong reason for it.
The only way to get std::char_traits<> is by including <string>, which
already has much more dependencies. In fact, I'm not really
convinced by the dependency argument vs. reusing standard algorithms.
Actually, std::copy and std::fill_n already have logics in place to
provide better optimization where possible. I would not recommend we
don't take the opportunies to reuse them.
-- Gaby
More information about the Libstdc++
mailing list