-
Notifications
You must be signed in to change notification settings - Fork 2.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
Compile Error VS2019 #1140
Comments
The error looks weird because there is no template parameter |
Also I couldn't repro this on godbolt: https://godbolt.org/z/jHsYkN |
The errors disapeared if directly append these source code There must be something wrong but i can't figure it out. Anyway, I am happy to see it works now. Thanks. |
I experienced same issue with msvc19.21 (VS2019 16.1.0 Preview 3.0). template <typename C, typename S, FMT_ENABLE_IF(internal::is_string<S>::value)> Template parameter // STRUCT TEMPLATE enable_if
template <bool _Test, class _Ty = void>
struct enable_if {}; // no member "type" when !_Test The problem is typename Adding additional parentheses around condition parameter fixed the problem for me. #define FMT_ENABLE_IF(...) typename std::enable_if<__VA_ARGS__, int>::type = 0 to #define FMT_ENABLE_IF(...) typename std::enable_if<(__VA_ARGS__), int>::type = 0 |
Error C2993 'fmt::v5::internal::value': illegal type for non-type template parameter '_Test' F:\project\fmt\include\fmt\core.h 904
Error C2039 'type': is not a member of 'std' F:\project\fmt\include\fmt\core.h 903
I just
#include <fmt/format.h>
and do nothing. everything works fine when building the source.The text was updated successfully, but these errors were encountered: