[libcxx-commits] [libcxx] [libc++][test] Fix invalid low-level const conversion in limited_allocator (PR #118189)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 6 05:59:34 PST 2024


================
@@ -467,7 +467,10 @@ class limited_allocator {
   TEST_CONSTEXPR_CXX20 pointer allocate(size_type n) { return handle_->template allocate<T>(n); }
   TEST_CONSTEXPR_CXX20 void deallocate(pointer p, size_type n) { handle_->template deallocate<T>(p, n); }
   TEST_CONSTEXPR size_type max_size() const { return N; }
-  TEST_CONSTEXPR BuffT* getHandle() const { return handle_.get(); }
+
+  // In C++11, constexpr non-static member functions are implicitly const, but this is no longer the case since C++14.
----------------
ldionne wrote:

How did you come across this issue?

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


More information about the libcxx-commits mailing list