boost/config/stdlib/libstdcpp3.hpp: Private or public header file?

Hi, I noticed that I get errors if I try to include boost/config/stdlib/libstdcpp3.hpp as some macros are redefined unconditionally. So it contains for example #ifdef __GLIBCXX__ #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) #else #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) #endif but boost/config/suffix.hpp defines it as well. This causes trouble if suffix.hpp is included and after it libstdcpp3.hpp. Since both files are not located in detail/ I consider both as public header files and it should be OK to include both (libstdcpp3.hpp will probably only included indirectly). Is it wrong to include boost/config/suffix.hpp? Jens

Jens Seidel wrote:
Hi,
I noticed that I get errors if I try to include boost/config/stdlib/libstdcpp3.hpp as some macros are redefined unconditionally.
So it contains for example #ifdef __GLIBCXX__ #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) #else #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) #endif
but boost/config/suffix.hpp defines it as well. This causes trouble if suffix.hpp is included and after it libstdcpp3.hpp.
Since both files are not located in detail/ I consider both as public header files and it should be OK to include both (libstdcpp3.hpp will probably only included indirectly).
Is it wrong to include boost/config/suffix.hpp?
Yes, only the headers documented in the Boost.Config docs are intended to be included directly. Trying to include some parts without others will almost certainly lead to problems. However, the headers are intended to be readable, easily hackable, and easily findable: which is why they're not hidden away. HTH, John.
participants (2)
-
Jens Seidel
-
John Maddock