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

[FR] Let SetUp and TearDown be std::function #1872

Open
balshetzer opened this issue Oct 29, 2024 · 0 comments
Open

[FR] Let SetUp and TearDown be std::function #1872

balshetzer opened this issue Oct 29, 2024 · 0 comments

Comments

@balshetzer
Copy link

balshetzer commented Oct 29, 2024

Is your feature request related to a problem? Please describe.
My benchmarks are parameterized (not by numbers) and I register them dynamically using RegisterBenchmark for various combinations of parameters. Setup and Teardown need those parameters. Custom setup and teardown take function pointers so I can't pass functors or lambdas with the parameters curried in.

Describe the solution you'd like
Setup and teardown can be std::function

Describe alternatives you've considered
manually creating all my benchmarks, setup, and teardown functions for each set of parameters. but that is not sustainable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants