This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Minimize <iosfwd>
Hi,
Excellent. Benjamin, I just went through the headers including
<iosfwd> and I'm pretty sure that removing from the latter
<bits/c++locale.h> is ok, basically because <bits/localefwd.h> takes
care of including it anyway. Very worst case, one/two headers may
require adjustements. That's very nice, because <bits/c++locale.h>
alone is about two thirds of <iosfwd>.
Yes, this is very cool I agree. Thanks for checking it in detail.
...
I hope this is clear enough. If not, as Paolo said, this could
certainly be done incrementally where all but the #if glibc part of
fposfwd.h is checked in from your orig patch, and #include cwchar is
used for the time being.
Thus, in the meanwhile, I'm committing the below self-contained bits.
Tested x86_64-linux, both locale models, without PCHs.
Paolo.
/////////////////
2007-04-11 Zack Weinberg <zack@mrtock.ucsd.edu>
* include/std/iosfwd: Do not include <bits/c++locale.h> and
<bits/functexcept.h>.
Index: include/std/iosfwd
===================================================================
--- include/std/iosfwd (revision 123710)
+++ include/std/iosfwd (working copy)
@@ -43,10 +43,8 @@
#pragma GCC system_header
#include <bits/c++config.h>
-#include <bits/c++locale.h>
#include <bits/stringfwd.h> // For string forward declarations.
#include <bits/postypes.h>
-#include <bits/functexcept.h>
_GLIBCXX_BEGIN_NAMESPACE(std)