| 142 | |
| 143 | template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator> |
| 144 | auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operator=(Bucket const& rhs) -> Bucket& { |
| 145 | if (auto o = rhs.valuePtr()) { |
| 146 | if (auto s = valuePtr()) |
| 147 | *s = *o; |
| 148 | else |
| 149 | new (&this->value) Value(*o); |
| 150 | } else { |
| 151 | if (auto s = valuePtr()) |
| 152 | s->~Value(); |
| 153 | } |
| 154 | this->hash = rhs.hash; |
| 155 | return *this; |
| 156 | } |
| 157 | |
| 158 | template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator> |
| 159 | auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::Bucket::operator=(Bucket&& rhs) -> Bucket& { |