-
Notifications
You must be signed in to change notification settings - Fork 272
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
Update loglevels.hpp #496
Update loglevels.hpp #496
Conversation
See KjellKod#495 for details
@SzGaa please review this. |
I think this is fine. Running tests now. |
Thank you @CryptoManiac for this insight and update |
This testing doesn't have a lot of sense because |
Compiler is not forced to use constexpr in compile-time context only (also not guaranteed that it will use that way even if could be possible), just allows it to be used in places where only compile time constants would be applicable. |
It allows them to be used in places like that because it does provide a guarantee that the expression is deterministic and the required data is known at compile-time. Therefore it may be evaluated in compile-time. Of course, for the sake of common sense, compiler won't actually evaluate expressions unless they're something very simple. But this has no visible side effects since the said limitations still stand. No heap allocations, no exceptions and only literal value types. It's also kind of understandable why
Well, Shakespeare was born in England, he wrote in english and spoke in english as well. Therefore, Shakespeare was english. Of course they are const since they're deterministic and their input data is const. :) |
See #495 for details
Issue is not triggered if __cplusplus is less than 202002L on your system.