Skip to content

Conversation

@krzikalla
Copy link
Contributor

There is a bug in the previous PR. If you use the macro across several translation units, then only one benchmark might get registered, since BENCHMARK_PRIVATE_NAME generates unique names only per translation unit. This PR should fix this.

I am unsure if it would be a good idea to declare the instantiation class (class UniqueName ...) in an unnamed namespace.

@dmah42
Copy link
Member

dmah42 commented Apr 11, 2025

oh well spotted.

@dmah42 dmah42 merged commit ff52b22 into google:main Apr 11, 2025
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants