-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement ranges::remove family #1005
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
Conversation
14e98b0 to
a858c57
Compare
CaseyCarter
left a comment
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.
Just a couple of non-functional nitpicks.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I rebased and squased the previous state and made the changes to the remove_copy{_if} algorithms. It even compiles locally |
|
There appear to be 4 remaining test failures complaining "compiler is out of heap space" although I haven't investigated the root cause. |
|
Yeah I went ahead and implemented the /analyze workaround regarding the |
|
@CaseyCarter I believe we have to limit the number of combinations here or do you have other suggestions on how to prevent the compiler from running out of heap space? |
Poking at the |
|
I am wondering whether it would be the best to actually prune combinations inside the If we would go with some mix with the most requirements this should not affect correctness |
We can't know which properties an algorithm is sensitive to without inspecting its implementation. Conversely, the set of properties to which an algorithm is sensitive could vary under maintenance. If we pick a set of properties a priori and use it for all algorithms we'll invariably miss test coverage. The obviously correct approach - given infinite resources - is to test everything so we know the important properties are covered. This is the rationale for the "generator" functions in Of course that also means they are often terrible, and that's ok: we can write algorithm-specific generators that only vary the properties the algorithm observes and put them in the algorithm's test. Colocation also hopefully provides a stronger guarantee that the algorithm and the generator will be maintained together. |
|
@CaseyCarter Given thatthere seems to be some general problem with /analyze I would not trim the tests down and wait for the "fix" to be applied. Hiss if you disagree. |
I've updated the problem description in GH-1030 with some more analysis. The int main() {
#ifndef _PREFAST_ // TRANSITION, GH-1030
STATIC_ASSERT((test_in_write<instantiator, int_wrapper, int_wrapper>(), true));
#endif // TRANSITION, GH-1030
test_in_write<instantiator, int_wrapper, int_wrapper>();
}(from |
* Reuse the projection that counts calls rather than duplicating to reduce the total number of template instantiations. * `remove_copy`/`remove_copy_if` failures are caused by proxy iterators in permissive mode - which we can't support anyway - not by VSO-938163.
StephanTLavavej
left a comment
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.
Approved with nitpick suggestions. Thanks!
Casey's last-minute comment nitpick.
|
Nice to finally remove this family of algorithms from the todo list ;) |
This implements the ranges::remove_{meow} algorithms.
There is something fishy with the copy version that I need to sleep sleep over.