-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<deque>: Use _Next_iter and _Prev_iter #1161
Conversation
Fixes DevCom-1134328 / AB#1166791.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have any sympathy for this in the same way we didn't have sympathy for that user who reported a 'vector does ADL things in its dtor requiring more things to be complete than are otherwise needed' before.
But the mitigation is cheap so why not.
I wonder if we should have a more comprehensive test (like our |
@StephanTLavavej The difference is that unlike the |
Formally |
Would that have protected against this particular case? |
Yes. The syndrome here is that we have two functions: struct S {
template <class T> S(T&&); // Everything converts to S
};
void f(S, int); // Unintentional ADL-hijacking function
void f(iterator, ptrdiff_t); // Actual function we want to call and we're evaluating |
Thanks for investigating and fixing this surprising bug! I never would have thought that an STL container couldn't say |
Fixes DevCom-1134328 / AB#1166791.