Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2165R4 Compatibility between tuple and tuple-like objects #5694

Merged
merged 1 commit into from Aug 16, 2022

Conversation

burblebee
Copy link
Contributor

@burblebee burblebee commented Jul 30, 2022

Fixes #5599

The 2nd part of this (replacing all usages of tuple-or-pair by tuple in the range clause) should be applied after P2374R4 #5605 as per the Editor's note at end of P2165R4.

@burblebee burblebee marked this pull request as draft July 30, 2022 12:08
@burblebee burblebee marked this pull request as ready for review July 30, 2022 13:08
source/support.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/containers.tex Show resolved Hide resolved
source/containers.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
burblebee added a commit that referenced this pull request Jul 31, 2022
burblebee added a commit that referenced this pull request Aug 2, 2022
@burblebee burblebee requested a review from JohelEGP August 2, 2022 03:29
source/support.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
@tkoeppe tkoeppe force-pushed the motions-2022-07-lwg-12 branch 4 times, most recently from 45e1a7b to bc09bd6 Compare August 15, 2022 15:48
@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 15, 2022

@jwakely, @cor3ntin: Could you please comment on the Editor's Note in the paper that asks whether we need to modify the container requirements, and says,

we probably want to requiere is_constructible<value_type, T> where T is either the type passed to insert, or
the InputIterator’s value_type. Currently, we only seem to require convertible_to, which may
not be sufficient?. An alternative is to add explicit insert overloads for pair-like objects

@cor3ntin
Copy link
Contributor

@tkoeppe Sorry, I guess i should have removed that note, it was more "lwg should discuss that" rather than actual editor guidance. I don't actually remember that it was discussed though.

I don't think there is an issue here either way, I'm struggling to imagine a case where pair would not be constructible from tuple-like. We may still want to add new overloads to associative containers for performance, maybe (i need to think about it more) but this would be nb comment material.

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 16, 2022

@cor3ntin: Thank you! I'll proceed as-is then, and we can follow up via issues later if and when necessary.

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 16, 2022

The 2nd part of this (replacing all usages of tuple-or-pair by tuple in the range clause) should be applied after P2374R4 #5605 as per the Editor's note at end of P2165R4.

I will add a corresponding addition to that motion when we get to it; for now, this paper is applied in its entirety.

Editorial changes:
* Added cross references in [tuple.rel] pointing at
  [basic.lookup.argdep].
* Addedd cross reference in [pairs.pair] pointing at
  [range.utility.helpers] for "different-from".
* Reworded section title in [tuple.common.ref].
* Added references in synopsis.
@tkoeppe tkoeppe merged commit d2940b0 into main Aug 16, 2022
@JohelEGP
Copy link
Contributor

Also resolves cplusplus/papers#876.

@jensmaurer jensmaurer deleted the motions-2022-07-lwg-12 branch November 18, 2022 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2022-07 LWG Motion 12] P2165R4 Compatibility between tuple and tuple-like objects
4 participants