| 166 | |
| 167 | template <typename BaseSet> |
| 168 | auto SetMixin<BaseSet>::takeFirst() -> value_type { |
| 169 | if (Base::empty()) |
| 170 | throw SetException("takeFirst called on empty set"); |
| 171 | auto i = Base::begin(); |
| 172 | value_type v = std::move(*i); |
| 173 | Base::erase(i); |
| 174 | return v; |
| 175 | } |
| 176 | |
| 177 | template <typename BaseSet> |
| 178 | auto SetMixin<BaseSet>::maybeTakeFirst() -> Maybe<value_type> { |