Specializations of std::char_traits
Matt Austern
austern@apple.com
Fri Jul 18 17:24:00 GMT 2003
On Friday, July 18, 2003, at 4:18AM, Gabriel Dos Reis wrote:
> 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.
If that's true, then I take back my concern about dependencies. And
it looks like it is true. I was mistakenly assuming that char_traits
was
defined as a complete type in <iosfwd>, but I see that it's not. It
looks
like we only need it as a complete type in <ios> (which includes
<string>) and in <string> itself.
So yes, I'll make that change and I'll stop going to heroic lengths to
avoid dependency on all of the stuff that <string> already depends on.
--Matt
More information about the Libstdc++
mailing list