1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
15 #include "allocators.h"
19 static bool allocator_constructed;
21 typedef A1<int> allocator_type;
25 alloc_first() : data_(0) {}
26 alloc_first(int d) : data_(d) {}
27 alloc_first(std::allocator_arg_t, const A1<int>& a)
31 allocator_constructed = true;
34 alloc_first(std::allocator_arg_t, const A1<int>& a, int d)
38 allocator_constructed = true;
41 alloc_first(std::allocator_arg_t, const A1<int>& a, const alloc_first& d)
45 allocator_constructed = true;
48 ~alloc_first() {data_ = -1;}
50 friend bool operator==(const alloc_first& x, const alloc_first& y)
51 {return x.data_ == y.data_;}
52 friend bool operator< (const alloc_first& x, const alloc_first& y)
53 {return x.data_ < y.data_;}
56 bool alloc_first::allocator_constructed = false;
58 #endif // ALLOC_FIRST_H