Fix faulty namespacification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-12 22:45:14 +00:00
parent 811ce9f4ca
commit e94e0edc3e
2 changed files with 14 additions and 8 deletions

View File

@ -23,6 +23,8 @@
#include <cstdlib> #include <cstdlib>
#include <memory> #include <memory>
namespace llvm {
template<typename T> template<typename T>
struct MallocAllocator { struct MallocAllocator {
typedef size_t size_type; typedef size_t size_type;
@ -68,14 +70,15 @@ template<typename T>
inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) { inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) {
return false; return false;
} }
} // End llvm namespace
namespace std { namespace std {
template<typename Type, typename Type2> template<typename Type, typename Type2>
struct _Alloc_traits<Type, ::MallocAllocator<Type2> > { struct _Alloc_traits<Type, ::llvm::MallocAllocator<Type2> > {
static const bool _S_instanceless = true; static const bool _S_instanceless = true;
typedef ::MallocAllocator<Type> base_alloc_type; typedef ::llvm::MallocAllocator<Type> base_alloc_type;
typedef ::MallocAllocator<Type> _Alloc_type; typedef ::llvm::MallocAllocator<Type> _Alloc_type;
typedef ::MallocAllocator<Type> allocator_type; typedef ::llvm::MallocAllocator<Type> allocator_type;
}; };
} }

View File

@ -23,6 +23,8 @@
#include <cstdlib> #include <cstdlib>
#include <memory> #include <memory>
namespace llvm {
template<typename T> template<typename T>
struct MallocAllocator { struct MallocAllocator {
typedef size_t size_type; typedef size_t size_type;
@ -68,14 +70,15 @@ template<typename T>
inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) { inline bool operator!=(const MallocAllocator<T>&, const MallocAllocator<T>&) {
return false; return false;
} }
} // End llvm namespace
namespace std { namespace std {
template<typename Type, typename Type2> template<typename Type, typename Type2>
struct _Alloc_traits<Type, ::MallocAllocator<Type2> > { struct _Alloc_traits<Type, ::llvm::MallocAllocator<Type2> > {
static const bool _S_instanceless = true; static const bool _S_instanceless = true;
typedef ::MallocAllocator<Type> base_alloc_type; typedef ::llvm::MallocAllocator<Type> base_alloc_type;
typedef ::MallocAllocator<Type> _Alloc_type; typedef ::llvm::MallocAllocator<Type> _Alloc_type;
typedef ::MallocAllocator<Type> allocator_type; typedef ::llvm::MallocAllocator<Type> allocator_type;
}; };
} }