[libcxx-commits] [libcxx] [libc++][memory] P2868R1: Removing deprecated typedef `std::allocator::is_always_equal` (PR #78562)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 18 05:35:44 PST 2024


================
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: c++23
+
+// <memory>
+
+// template <class T>
+// class allocator
+// {
+// ...
+//     typedef true_type is_always_equal; // Deprecated in C++23, removed in C++26
+// ...
+// };
+
+#include <memory>
+
+template <typename T>
+void check() {
+  typedef std::allocator<char>::is_always_equal IAE; // expected-warning {{'is_always_equal' is deprecated}}
----------------
H-G-Hristov wrote:

```suggestion
  typedef std::allocator<T>::is_always_equal IAE; // expected-warning {{'is_always_equal' is deprecated}}
```

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


More information about the libcxx-commits mailing list