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

Issue with latest MSVC compiler and /std:c++latest-flag #2655

Closed
cryeprecision opened this issue Dec 15, 2021 · 1 comment
Closed

Issue with latest MSVC compiler and /std:c++latest-flag #2655

cryeprecision opened this issue Dec 15, 2021 · 1 comment

Comments

@cryeprecision
Copy link

cryeprecision commented Dec 15, 2021

I stumbled upon this today when compiling with MSVC with /std:c++latest using this release of fmt https://github.com/fmtlib/fmt/releases/download/8.0.1/fmt-8.0.1.zip.

I put together a minimal example that reproduces the issue I got on godbolt.org (linked below).
It compiles just fine if I remove the #include <filesystem> line or if I compile with /std:c++20.

minimal example that reproduces the error (EDIT: Line 12 is causing the error)

Error message (copied from the linked example):

example.cpp
C:/data/libraries/installed/x64-windows/include\fmt/xchar.h(224): error C2668: 'fmt::v8::make_wformat_args': ambiguous call to overloaded function
C:/data/libraries/installed/x64-windows/include\fmt/xchar.h(44): note: could be 'fmt::v8::format_arg_store<fmt::v8::wformat_context,std::wstring> fmt::v8::make_wformat_args<std::wstring>(const std::wstring &)'
C:/data/msvc/14.31.30818-Pre/include\format(2805): note: or       'auto std::make_wformat_args<std::wstring>(const std::wstring &)' [found using argument-dependent lookup]
C:/data/libraries/installed/x64-windows/include\fmt/xchar.h(223): note: while trying to match the argument list '(std::wstring)'
<source>(12): note: see reference to function template instantiation 'void fmt::v8::print<std::wstring&>(fmt::v8::basic_format_string<wchar_t,std::wstring &>,std::wstring &)' being compiled
C:/data/libraries/installed/x64-windows/include\fmt/xchar.h(224): error C2661: 'fmt::v8::vprint': no overloaded function takes 1 arguments
Compiler returned: 2
@vitaut
Copy link
Contributor

vitaut commented Dec 16, 2021

Same as #2639 (already fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants