[libcxx-commits] [libcxx] [libc++] Fix ambiguous call to std::max in vector<bool> (PR #119801)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 15 10:10:06 PST 2025
================
@@ -0,0 +1,121 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// <vector>
+// vector<bool>
+
+// This test examines ambiguous calls to std::max in vector<bool>
+// Fix https://github.com/llvm/llvm-project/issues/121713
+
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <limits>
+#include <memory>
+#include <new>
+#include <vector>
+
+#include "test_macros.h"
+
+template <typename T, typename SIZE_TYPE = std::size_t, typename DIFF_TYPE = std::ptrdiff_t>
----------------
winner245 wrote:
Yeah, fixing the UB or ambiguous calls in my other PRs is a prerequisite for this one. Given that all these PRs and various tests utilize the `sized_allocator` class, I've elevated it to a support header file for the tests.
https://github.com/llvm/llvm-project/pull/119801
More information about the libcxx-commits
mailing list