[libcxx-commits] [libcxx] [libcxx] improves diagnostics for containers with bad value types (PR #106296)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 29 13:08:42 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
----------------
ldionne wrote:
Instead of adding TODOs here, could you file a Github issue listing the cases you'd like to tackle as a follow-up?
https://github.com/llvm/llvm-project/pull/106296
More information about the libcxx-commits
mailing list