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

C++20 format function clashes with testlib's format #214

Open
quangloc99 opened this issue Nov 13, 2024 · 0 comments
Open

C++20 format function clashes with testlib's format #214

quangloc99 opened this issue Nov 13, 2024 · 0 comments

Comments

@quangloc99
Copy link
Contributor

quangloc99 commented Nov 13, 2024

The new C++20 format is clashing with testlib's format one. These 2 are not compatible with each other, and they clash each other when there is using namespace std. I'm used to the testlib one when preparing the contest. However, the change in C++20 caught me off-guard, since std::format got resolved by gcc. To use testlib's format, I need to specify ::format.

I think there are 2 things that can be done. One is to warn about the new function, and two is to rename the function/scope it into a different namespace. I'm not sure about the warning part, since it seems not straight forward to do so. But this is a breaking part for a frequently used function.

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

No branches or pull requests

1 participant