
select_stdlib_config.hpp has just been changed to include <iosfwd> instead of <utility>. But g++ 2.95's standard library has its own iostreams implementation which doesn't define __STL_CONFIG_H. It does define __IOSFWD__, so maybe that could be checked for as well? Is it okay to commit the attached patch? I've changed sgi.hpp to go back to including <utility> if __STL_CONFIG_H isn't defined so that anything that checks for _STL_CONFIG_H will still work. Also, if __IOSFWD__ happens to be used in another library, it will fail to compile. Daniel

Oh No! It's basically *impossible* to implement the new TR1 library if Boost.Config includes anything that may in turn include one of the modified TR1 headers: <utility> <memory> or <functional>. I'll take another look at the SGI STL, but any other ideas? Thanks, John.

John Maddock wrote:
Sadly, it can't, g++-2.95 doesn't have a limits header. I think that <algorithm>, <numeric>, <stdexcept> or any of the containers would work. Alternatively, it might be possible to use iosfwd, and look into changing anything that checks for __STL_CONFIG_H. Daniel

Daniel James wrote:
I've tried running some of the headers through the preprocessor, <iterator> looks like the smallest (but still much larger than <iosfwd> & <utility>). Although, <string> might be a better choice, as it's more likely to be included elsewhere. Daniel

Sigh, sadly no can do, they all end including one of the TR1 "poisoned" headers (<memory> etc) eventually, and you end up with cyclic dependencies, the problem is basically: Boost.Config -> includes <string> (for example) .... includes <memory> finds the TR1 version, which... includes <boost/shared.hpp> which requires Boost.Config to have been fully parsed already, but it's not, we're still in the middle of it! There are other cyclic issues that are *much* worse than this, and I have a nasty feeling I haven't found all of them yet. It basically sucks, and I've been tearing my hair out over this, because I also have a nasty suspicion that the TR1 headers will crash and burn if some of the Boost headers are included first. Clearly that's not acceptable. I think I have a solution that can be applied to Boost.Config and will let us go back to using <utility> which has proved itself remarkably reliable, but it's intrusive and can't really be applied to Boost as a whole. So... I think I'm going with plan Z (the other 25 having been exhaused!), and I'll revert the recent change, and go back to the drawing board... John.
participants (2)
-
Daniel James
-
John Maddock