| 161 | } |
| 162 | |
| 163 | std::pair<iterator, bool> insert(const value_type& val) { |
| 164 | return std::visit([this, &val](auto m) -> std::pair<iterator, bool> { |
| 165 | // @todo is monostate still necessary here? |
| 166 | if constexpr (!std::is_same_v<std::decay_t<decltype(m)>, std::monostate>) { |
| 167 | auto result = m->insert(val); |
| 168 | return { iterator(result.first), result.second }; |
| 169 | } else { |
| 170 | return { end(), false }; |
| 171 | } |
| 172 | }, map_); |
| 173 | } |
| 174 | }; |