[libcxx-commits] [libcxx] [libc++] implement `std::flat_multimap` (PR #113835)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 17 11:17:11 PST 2025


================
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+// <flat_map>
+
+// class flat_multimap
+
+// [[nodiscard]] bool empty() const noexcept;
+
+#include <flat_map>
+#include <cassert>
+#include <deque>
+#include <functional>
+#include <utility>
+#include <vector>
+
+#include "MinSequenceContainer.h"
+#include "test_macros.h"
+#include "min_allocator.h"
+
+template <class KeyContainer, class ValueContainer>
+void test() {
+  using M = std::flat_multimap<int, double, std::less<int>, KeyContainer, ValueContainer>;
----------------
ldionne wrote:

```suggestion
  using Key = typename KeyContainer::value_type;
  using Value = typename ValueContainer::value_type;
  using M = std::flat_multimap<Key, Value, std::less<Key>, KeyContainer, ValueContainer>;
```

https://github.com/llvm/llvm-project/pull/113835


More information about the libcxx-commits mailing list