[libcxx-commits] [libcxx] [libcxx] improves diagnostics for containers with bad value types (PR #106296)
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 29 14:09:26 PDT 2024
================
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// Checks that we can only form multimaps of object types.
+
+#include <map>
+
+std::multimap<int const, int> K1;
+std::multimap<int, int const> M1;
+// TODO(cjdb): turn this into a compile-time error
----------------
cjdb wrote:
How about both? I like doing `// TODO(#<issue-number>)` since it means one can identify exactly where the issue is referring to, and how many problems there are to solve before closing.
https://github.com/llvm/llvm-project/pull/106296
More information about the libcxx-commits
mailing list