Fix another accessibility problem illuminated by GCC 3.3
[oota-llvm.git] / include / Support / hash_set
1 //===-- Support/hash_set - "Portable" wrapper around hash_set ---*- C++ -*-===//
2 //
3 // This file provides a wrapper around the mysterious <hash_set> header file
4 // that seems to move around between GCC releases into and out of namespaces at
5 // will.  #including this header will cause hash_set to be available in the
6 // global namespace.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef SUPPORT_HASH_SET
11 #define SUPPORT_HASH_SET
12
13 // Compiler Support Matrix
14 //
15 // Version   Namespace   Header File
16 //  2.95.x       ::        hash_set
17 //  3.0.4       std      ext/hash_set
18 //  3.1      __gnu_cxx   ext/hash_set
19 //
20
21 #include "Config/config.h"
22
23 #ifdef HAVE_GNU_EXT_HASH_SET
24
25 #include <ext/hash_set>
26 #define HASH_NAMESPACE __gnu_cxx
27
28 #else
29
30 #ifdef HAVE_STD_EXT_HASH_SET
31 #include <ext/hash_set>
32 #define HASH_NAMESPACE std
33
34 #else
35 #include <hash_set>
36 #define HASH_NAMESPACE
37 #endif
38
39 #endif
40
41 using HASH_NAMESPACE::hash_set;
42 using HASH_NAMESPACE::hash;
43
44 // Include vector because ext/hash_set includes stl_vector.h and leaves
45 // out specializations like stl_bvector.h, causing link conflicts.
46 #include <vector>
47
48 #include <Support/HashExtras.h>
49
50 #endif
51