Subject: [boost] [config][predef] Is it OK for boost.config to depend on boost.predef?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2014-05-28 09:50:54
There is a config pull request outstanding that includes <boost/predef.h>.
If it was almost any library other than config, I'd apply this without a
second thought. But Boost config is special in that if it breaks, virtually
the whole of boost breaks. So it makes sense to be cautious about
dependencies. Has there been any discussion about the relationship between
Boost.config and Boost.predef?
Even if we accept the patch, is <boost/predef.h> the right header? It just
The rationale for the pull request is a need in other Boost libraries to
detect Windows platform variants like BOOST_PLAT_WINDOWS_DESKTOP
andBOOST_PLAT_WINDOWS_RUNTIME. Boost.Predef does a nice job of that.
only header strictly needed is <boost/predef/platform.h>.
So the desired effect can be achieved several ways:
1) #include <boost/predef.h> in the include/boost/config/platform/ headers.
2) #include <boost/predef/platform.h> in the include/boost/config/platform/
3) #include <boost/predef.h> in the files that actually use the desired
4) #include <boost/predef/platform.h> in the files that actually use the
If I had been writing the code myself, I probably would have selected
option (4). What do others think?