[libc++][test] Fix invalid const conversion in limited_allocator (#118189)

This patch fixes a const-qualification on the return type of a method
of `limited_allocator`, which is widely used for testing allocator-aware
containers.
This commit is contained in:
Peng Liu 2024-12-10 10:24:40 -05:00 committed by GitHub
parent e3284d8cc7
commit eacdbc269e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -477,7 +477,7 @@ public:
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(); }
TEST_CONSTEXPR const BuffT* getHandle() const { return handle_.get(); }
};
template <class T, class U, std::size_t N>