aboutsummaryrefslogtreecommitdiffstats
path: root/include/Support/slist
blob: 71670e6af295363a7e65c81ba09c0eb16c011273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//===-- 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
#define SUPPORT_SLIST

// 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

#endif