BOOST_SLIST_HEADER

I've noticed that the following has been added to the config/stdlib/libstdcpp3.hpp #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST # define BOOST_HAS_HASH # define BOOST_SLIST_HEADER <ext/slist> # define BOOST_HASH_SET_HEADER <ext/hash_set> # define BOOST_HASH_MAP_HEADER <ext/hash_map> #endif My question is: How is BOOST_SLIST_HEADER intended to be used. At first I thought that one was expected to do something like the following: #ifdef BOOST_HAS_SLIST #include BOOST_SLIST_HEADER #endif But since BOOST_SLIST_HEADER is only defined in config/stdlib/libstdcpp3.hpp other libraries that support define BOOST_HAS_SLIST. On the otherhand if one has to use: #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 then whats point of defining BOOST_SLIST_HEADER rather than just using #include <ext/slist> What should I be doing here? Robert Ramey

On Jan 27, 2006, at 7:10 PM, Robert Ramey wrote:
I've noticed that the following has been added to the config/stdlib/libstdcpp3.hpp
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST # define BOOST_HAS_HASH # define BOOST_SLIST_HEADER <ext/slist> # define BOOST_HASH_SET_HEADER <ext/hash_set> # define BOOST_HASH_MAP_HEADER <ext/hash_map> #endif
Yep, that was my fault...
My question is: How is BOOST_SLIST_HEADER intended to be used.
At first I thought that one was expected to do something like the following:
#ifdef BOOST_HAS_SLIST #include BOOST_SLIST_HEADER #endif
I've been using it like this: #ifdef BOOST_HAS_SLIST # ifdef BOOST_SLIST_HEADER # include BOOST_SLIST_HEADER # else # include <slist> #endif However, the right answer is probably to add this to config/suffix.hpp: #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) # define BOOST_SLIST_HEADER <slist> #endif Likewise for the hash_set and hash_map headers. If nobody objects, I'll make this change so that BOOST_SLIST_HEADER becomes useful. (And, of course, I'll document the new functionality). Doug

However, the right answer is probably to add this to config/suffix.hpp:
#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) # define BOOST_SLIST_HEADER <slist> #endif
Likewise for the hash_set and hash_map headers.
If nobody objects, I'll make this change so that BOOST_SLIST_HEADER becomes useful. (And, of course, I'll document the new functionality).
Yep, please do go ahead, John.
participants (3)
-
Douglas Gregor
-
John Maddock
-
Robert Ramey