diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-24 04:31:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-24 04:31:49 +0000 |
commit | a430bc7569e3c43eafb5ac75bccab9ec27f8dc05 (patch) | |
tree | 54a18d1052cc882c3ce6bc1c0bc9bb5611249460 /include/Support/slist | |
parent | 2e6e741b737960ecd0b68610875050019aac0f07 (diff) |
Add support for the slist extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/slist')
-rw-r--r-- | include/Support/slist | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/Support/slist b/include/Support/slist new file mode 100644 index 0000000000..4aad27ffe0 --- /dev/null +++ b/include/Support/slist @@ -0,0 +1,32 @@ +//===-- Support/slist - "Portable" wrapper around slist ---------*- C++ -*-===// +// +// This file provides a wrapper around the mysterious <slist> header file that +// seems to move around between GCC releases into and out of namespaces at will. +// #including this header will cause hash_map to be available in the global +// namespace. +// +//===----------------------------------------------------------------------===// + +#ifndef SUPPORT_SLIST_H +#define SUPPORT_SLIST_H + +// Compiler Support Matrix +// +// Version Namespace Header File +// 2.95.x :: slist +// 3.0.4 std ext/slist +// 3.1 __gnu_cxx ext/slist +// +#if __GNUC__ == 3 +#include <ext/slist> + +#if __GNUC_MINOR__ == 0 +using std::slist; +#else +using __gnu_cxx::slist; +#endif + +#else +// GCC 2.x +#include <slist> +#endif |