Skip to content

Commit 2f2f79a

Browse files
committed
Fix invalid low-level const conversion
1 parent 22417ec commit 2f2f79a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxx/test/support/test_allocator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ class limited_allocator {
467467
TEST_CONSTEXPR_CXX20 pointer allocate(size_type n) { return handle_->template allocate<T>(n); }
468468
TEST_CONSTEXPR_CXX20 void deallocate(pointer p, size_type n) { handle_->template deallocate<T>(p, n); }
469469
TEST_CONSTEXPR size_type max_size() const { return N; }
470-
TEST_CONSTEXPR BuffT* getHandle() const { return handle_.get(); }
470+
TEST_CONSTEXPR const BuffT* getHandle() const { return handle_.get(); }
471+
TEST_CONSTEXPR BuffT* getHandle() { return handle_.get(); }
471472
};
472473

473474
template <class T, class U, std::size_t N>

0 commit comments

Comments
 (0)