Lines Matching defs:SwapAllocator
101 template <typename T> class SwapAllocator;
104 class SwapAllocator<void> {
112 typedef SwapAllocator<U> other;
115 explicit SwapAllocator(SwapSpace* swap_space) : swap_space_(swap_space) {}
118 SwapAllocator(const SwapAllocator<U>& other) : swap_space_(other.swap_space_) {}
120 SwapAllocator(const SwapAllocator& other) = default;
121 SwapAllocator& operator=(const SwapAllocator& other) = default;
122 ~SwapAllocator() = default;
128 friend class SwapAllocator;
132 class SwapAllocator {
144 typedef SwapAllocator<U> other;
147 explicit SwapAllocator(SwapSpace* swap_space) : swap_space_(swap_space) {}
150 SwapAllocator(const SwapAllocator<U>& other) : swap_space_(other.swap_space_) {}
152 SwapAllocator(const SwapAllocator& other) = default;
153 SwapAllocator& operator=(const SwapAllocator& other) = default;
154 ~SwapAllocator() = default;
163 pointer allocate(size_type n, SwapAllocator<void>::pointer hint ATTRIBUTE_UNUSED = nullptr) {
190 inline bool operator==(SwapAllocator const& other) {
193 inline bool operator!=(SwapAllocator const& other) {
201 friend class SwapAllocator;
205 using SwapVector = std::vector<T, SwapAllocator<T>>;
207 using SwapSet = std::set<T, Comparator, SwapAllocator<T>>;