Skip to content

Remove invoke_if() function in tests #2145

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

SergeyKopienko
Copy link
Contributor

@SergeyKopienko SergeyKopienko commented Mar 26, 2025

Remove invoke_if() function in tests: this function simple calls their argument and looks like not required:

template <typename Policy, typename F>
static void
invoke_if(Policy&&, F f)
{
    f();
}

In tests we simple replaces their calls with arguments to direct calls:

  • before:
        invoke_if(exec, [&]() {
            partition(exec, iter, iter, non_const(is_even));
        });
  • after:
        partition(exec, iter, iter, non_const(is_even));

@SergeyKopienko SergeyKopienko added the test Test only Change label Mar 26, 2025
@SergeyKopienko SergeyKopienko added this to the 2022.9.0 milestone Mar 26, 2025
Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SergeyKopienko SergeyKopienko merged commit fb1bd87 into main Mar 27, 2025
20 checks passed
@SergeyKopienko SergeyKopienko deleted the dev/skopienko/remove_invoke_if_from_tests branch March 27, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test only Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants