Minimize <iosfwd>

Zack Weinberg zackw@panix.com
Wed Apr 11 17:33:00 GMT 2007


On 4/11/07, Benjamin Kosnik <bkoz@redhat.com> wrote:
>
> For postypes.h/fposfwd.h bits that use mbstate_t, I was thinking of
> moving all the bits around like so:
>
> config/locale/generic/mbstate_t.h
>
> Has include of cwchar if mbstate_t exists, else has the definition in
> cwchar.h. Ie, move that logic out to this file.
>
> config/locale/gnu/mbstate_t.h
>
> Has the __need_mbstate_t define and the include of cwchar, appropriate
> typedefs to std::mbstate_t
>
> Of course, fposfwd.h includes bits/mbstate_t.h
>
> Config-side, it will work much like CLOCALE_H in GLIBCXX_ENABLE_CLOCALE
> from acinclude.m4, with the resulting symlink to the correct mbstate_t.h
> being generated in include/Makefile.am as part of the host_headers rule.
>   (ie, like os_defines.h)

I think i see how to do that, and will look into it when I get a
chance (not before the weekend).

Do you have any thoughts on declaring allocator<T> and char_traits<T>
(what we currently use stringfwd for)?  I would really like to get
<iosfwd> down to just what the standard requires it to declare...

zw



More information about the Libstdc++ mailing list