Skip to content

Commit 2ca101f

Browse files
[libc++][test] Fix MaybePOCCAAllocator to finally meet the allocator requirements (#74960)
Found while running libc++'s test suite with MSVC's STL. After @CaseyCarter's [LLVM-D118279](https://reviews.llvm.org/D118279) c5ba46e "\[libcxx\]\[test\] `MaybePOCCAAllocator` should meet the *Cpp17Allocator* requirements" followed by @philnik777's [LLVM-D68365](https://reviews.llvm.org/D68365) 98d3d5b "\[libc++\] Implement [P1004R2](https://wg21.link/P1004R2) (`constexpr std::vector`)", one more change is necessary. MSVC's `constexpr vector` implementation noticed this because we always rebind allocators.
1 parent 9930f3e commit 2ca101f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/support/allocators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class MaybePOCCAAllocator {
209209
: id_(id), copy_assigned_into_(copy_assigned_into) {}
210210

211211
template <class U>
212-
MaybePOCCAAllocator(const MaybePOCCAAllocator<U, POCCAValue>& that)
212+
TEST_CONSTEXPR MaybePOCCAAllocator(const MaybePOCCAAllocator<U, POCCAValue>& that)
213213
: id_(that.id_), copy_assigned_into_(that.copy_assigned_into_) {}
214214

215215
MaybePOCCAAllocator(const MaybePOCCAAllocator&) = default;

0 commit comments

Comments
 (0)