-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Overloaded std::ostream operators for enum types are not being used by spdlog #150
Comments
This is a C++ Format issue so I opened an issue there: fmtlib/fmt#232. |
The issue has been fixed in C++ Format (fmtlib/fmt@6cff6d8), but the spdlog's copy has to be updated for this to have effect. |
Updated.. Thanks @vitaut |
Updated version works fine. Thanks |
So how do i get this to work as the user? |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If someone tries to implement output operators for enum types (for much more informative output) then spdlog just implicitly casts the enum to int and gives the operator no chance. This can be fixed by changing the IsConvertibleToInt type trait.
enum { value = !std::is_enum::value && (sizeof(convert(get())) == sizeof(yes)) };
The text was updated successfully, but these errors were encountered: