test pair-copyability on C++17 upwards#1886
Merged
Merged
Conversation
7c222cf to
3d9cd8d
Compare
Member
|
This looks good -- however, it would be good to have a test for a non-copyable data structure with pairs (e.g. |
Contributor
Author
|
Upon writing the tests, i've noticed that the same problems seem to arise with |
3cb8eef to
a3657ee
Compare
4 tasks
Contributor
Author
|
Any updates on this, are the tests acceptable? |
The stdlib falsely detects containers like M=std::map<T, U> as copyable, even when one of T and U is not copyable. Therefore we cannot rely on the stdlib dismissing std::pair<T, M> by itself, even on C++17.
bind_map used std::is_copy_assignable which suffers from the same problems as std::is_copy_constructible, therefore the same fix has been applied.
a3657ee to
3600093
Compare
Member
|
Looks good to me—thanks! |
Contributor
Author
|
Thank you! |
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.
The stdlib falsely detects containers like
M=std::map<T, U>as copyable, even when one of T and U is not copyable.Therefore we cannot rely on the stdlib dismissing
std::pair<T, M>by itself, even on C++17.Fixes #1885