/// Access to the allocator.
- typedef typename ReferenceAdder<AllocatorTy>::result AllocatorRefTy;
- typedef typename ReferenceAdder<const AllocatorTy>::result AllocatorCRefTy;
- AllocatorRefTy getAllocator() { return Allocator; }
- AllocatorCRefTy getAllocator() const { return Allocator; }
+ AllocatorTy &getAllocator() { return Allocator; }
+ const AllocatorTy &getAllocator() const { return Allocator; }
bool count(const K &Key) const {
return TopLevelMap.count(Key);
clear();
}
- typedef typename ReferenceAdder<AllocatorTy>::result AllocatorRefTy;
- typedef typename ReferenceAdder<const AllocatorTy>::result AllocatorCRefTy;
- AllocatorRefTy getAllocator() { return Allocator; }
- AllocatorCRefTy getAllocator() const { return Allocator; }
+ AllocatorTy &getAllocator() { return Allocator; }
+ const AllocatorTy &getAllocator() const { return Allocator; }
typedef const char* key_type;
typedef ValueTy mapped_type;
#include <cstdlib>
namespace llvm {
-template <typename T> struct ReferenceAdder {
- typedef T &result;
-};
-template <typename T> struct ReferenceAdder<T &> {
- typedef T result;
-};
/// \brief CRTP base class providing obvious overloads for the core \c
/// Allocate() methods of LLVM-style allocators.