[libc++][test] Fix MaybePOCCAAllocator to finally meet the allocator requirements#74960
Merged
StephanTLavavej merged 1 commit intollvm:mainfrom Dec 10, 2023
Merged
Conversation
MSVC's constexpr vector implementation noticed this because we always rebind allocators.
Member
|
@llvm/pr-subscribers-libcxx Author: Stephan T. Lavavej (StephanTLavavej) ChangesFound while running libc++'s test suite with MSVC's STL. After @CaseyCarter's LLVM-D118279 c5ba46e "[libcxx][test] MSVC's Full diff: https://github.com/llvm/llvm-project/pull/74960.diff 1 Files Affected:
diff --git a/libcxx/test/support/allocators.h b/libcxx/test/support/allocators.h
index 2b987ad872783e..02436fd9c35ef1 100644
--- a/libcxx/test/support/allocators.h
+++ b/libcxx/test/support/allocators.h
@@ -209,7 +209,7 @@ class MaybePOCCAAllocator {
: id_(id), copy_assigned_into_(copy_assigned_into) {}
template <class U>
- MaybePOCCAAllocator(const MaybePOCCAAllocator<U, POCCAValue>& that)
+ TEST_CONSTEXPR MaybePOCCAAllocator(const MaybePOCCAAllocator<U, POCCAValue>& that)
: id_(that.id_), copy_assigned_into_(that.copy_assigned_into_) {}
MaybePOCCAAllocator(const MaybePOCCAAllocator&) = default;
|
mordante
approved these changes
Dec 10, 2023
Member
Author
|
Thanks! The checks are green, modulo what #74987 is about to fix, and unrelated sporadic timeouts/failures. Merging... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while running libc++'s test suite with MSVC's STL.
After @CaseyCarter's LLVM-D118279 c5ba46e "[libcxx][test]
MaybePOCCAAllocatorshould meet the Cpp17Allocator requirements" followed by @philnik777's LLVM-D68365 98d3d5b "[libc++] Implement P1004R2 (constexpr std::vector)", one more change is necessary.MSVC's
constexpr vectorimplementation noticed this because we always rebind allocators.