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

Warning: msvc 16.10-pre4 clashes with {fmt} #2295

Closed
JessyDL opened this issue May 19, 2021 · 4 comments
Closed

Warning: msvc 16.10-pre4 clashes with {fmt} #2295

JessyDL opened this issue May 19, 2021 · 4 comments

Comments

@JessyDL
Copy link
Contributor

JessyDL commented May 19, 2021

As a continuation of #2284, in preview 4 more clashes are happening.

Unlike previously, you are not required to #include <format> as the latest STL has started to use its own implementation. Including <chrono> will now trigger the clash.

Example error:

fmt-src\include\fmt/core.h(2784,23): error C2668: 'fmt::v7::make_format_args': ambiguous call to overloaded function 
fmt-src\include\fmt/core.h(1625,46): message : could be 'fmt::v7::format_arg_store<fmt::v7::format_context,spdlog::filename_t,size_t,spdlog::filename_t> fmt::v7::make_format_args<fmt::v7::format_context,spdlog::filename_t,size_t,spdlog::filename_t>(const spdlog::filename_t &,const size_t &,const spdlog::filename_t &)' 
Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.29.30036\include\format(2848,17): message : or       'auto std::make_format_args<std::format_context,spdlog::filename_t,size_t,spdlog::filename_t>(const spdlog::filename_t &,const size_t &,const spdlog::filename_t &)' [found using argument-dependent lookup] 
fmt-src\include\fmt/core.h(2783,1): message : while trying to match the argument list '(spdlog::filename_t, size_t, spdlog::filename_t)' 
spdlog-src\include\spdlog/sinks/rotating_file_sink-inl.h(53): message : see reference to function template instantiation 'std::string fmt::v7::format<spdlog::filename_t&,size_t&,spdlog::filename_t&>(fmt::v7::basic_format_string<char,spdlog::filename_t &,size_t &,spdlog::filename_t &>,spdlog::filename_t &,size_t &,spdlog::filename_t &)' being compiled 
spdlog-src\include\spdlog/sinks/rotating_file_sink-inl.h(45): message : while compiling class template member function 'spdlog::filename_t spdlog::sinks::rotating_file_sink<std::mutex>::calc_filename(const spdlog::filename_t &,size_t)' 
spdlog-src\include\spdlog/sinks/rotating_file_sink-inl.h(33): message : see reference to function template instantiation 'spdlog::filename_t spdlog::sinks::rotating_file_sink<std::mutex>::calc_filename(const spdlog::filename_t &,size_t)' being compiled 
spdlog-src\src\file_sinks.cpp(19): message : see reference to class template instantiation 'spdlog::sinks::rotating_file_sink<std::mutex>' being compiled
fmt-src\include\fmt/core.h(2784,10): error C2661: 'std::vformat': no overloaded function takes 1 arguments 
@vitaut
Copy link
Contributor

vitaut commented May 19, 2021

Thanks for reporting. PRs are welcome =).

@JessyDL
Copy link
Contributor Author

JessyDL commented May 19, 2021

Was resolved and merged with PR #2296

@JessyDL JessyDL closed this as completed May 19, 2021
@mkurdej
Copy link
Contributor

mkurdej commented May 20, 2021

Just FYI, MSVC 16.10 preview 3 exhibited this problem too. And there are still (even after PR #2296) some unqualified calls to make_format_args that might break.
I'll maybe be able to do a PR to finish these but don't know when (so if somebody is faster... :) ).

@vitaut
Copy link
Contributor

vitaut commented May 20, 2021

These have already been fixed (at least in core.h): 63271a5

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

3 participants