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

Implement LWG-3865 Sorting a range of pairs #3476

Merged
merged 5 commits into from
Feb 23, 2023

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Feb 17, 2023

Fixes #3419

@fsb4000 fsb4000 requested a review from a team as a code owner February 17, 2023 09:27
@fsb4000
Copy link
Contributor Author

fsb4000 commented Feb 17, 2023

libc++ test has

// Needed by do_forwarding_test() since it compares pairs of different types.
template <class T1, class T2, class U1, class U2>
inline bool operator==(const std::pair<T1, T2>& lhs, const std::pair<U1, U2>& rhs) {
    return lhs.first == rhs.first && lhs.second == rhs.second;
}

and because of that we get

C:\Dev\STL\llvm-project\libcxx\test\std\utilities\tuple\tuple.tuple\tuple.apply\make_from_tuple.pass.cpp(75,23): error: use of overloaded operator '==' is ambiguous (with operand types 'const pair<std::decay_t<int &>, std::decay_t<const char *>>' (aka 'const pair<int, const char *>') and 'std::pair<int &, const char *>')
return value.args == tup
~~~~~~~~~~ ^ ~~~

@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Feb 17, 2023
@CaseyCarter CaseyCarter added the decision needed We need to choose something before working on this label Feb 19, 2023
@strega-nil-ms
Copy link
Contributor

I feel comfortable unmarking decision needed; given that it'd be pretty difficult to get broken by these changes, I'm totally willing to treat this as a DR.

@CaseyCarter CaseyCarter removed the decision needed We need to choose something before working on this label Feb 21, 2023
@StephanTLavavej StephanTLavavej self-assigned this Feb 22, 2023
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 9fb8168 into microsoft:main Feb 23, 2023
@StephanTLavavej
Copy link
Member

Thanks for implementing this significant usability improvement - one of my top annoyances from C++98! 😻 🎉 ✨

@fsb4000 fsb4000 deleted the fix3419 branch February 23, 2023 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3865 Sorting a range of pairs
6 participants