This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How widely used are <ext/hash_set> and <ext/hash_map>?


On Friday 26 of October 2007 19:40:34 Joe Buck wrote:

> Some programs try to isolate the details of where the headers are by
> having one header with #ifdefs that, in turn, does the #include of
> <ext/hash_{set,map}>, but many others do not.

I think you shouldn't care about implementation specific #include <ext/...>.
I'm using libstdc++ and stlport in parallel and have suitable #ifdefs:

#if defined( _STLP_MSVC ) || defined( _STLP_UNIX )
#include <hash_map>
#define sgiext std
#elif defined( __GLIBCXX__ )
#include <ext/hash_map>
#define sgiext __gnu_cxx
#else
#error "sgi::hash_map implementation not available?"
#endif

sgiext::hash_map<...>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]