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

xchar.h clashes with MSVC's format implementation (ambiguous make_wformat_args) #2639

Closed
gix opened this issue Dec 9, 2021 · 1 comment
Closed

Comments

@gix
Copy link
Contributor

gix commented Dec 9, 2021

Using fmt 8.0.1 with VS2022 (VC++ 14.30.30705) gives:

1>C:\dev\...\include\fmt\xchar.h(220,39): error C2668: 'fmt::v8::make_wformat_args': ambiguous call to overloaded function
1>  return vprint(f, wstring_view(fmt), make_wformat_args(args...));
1>                                      ^
1>C:\dev\...\include\fmt\xchar.h(44,54): note: could be 'fmt::v8::format_arg_store<fmt::v8::wformat_context,std::wstring_view> fmt::v8::make_wformat_args<std::wstring_view>(const std::wstring_view &)'
1>constexpr format_arg_store<wformat_context, Args...> make_wformat_args(
1>                                                     ^
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\include\format(2795,17): note: or       'auto std::make_wformat_args<std::wstring_view>(const std::wstring_view &)' [found using argument-dependent lookup]
1>_NODISCARD auto make_wformat_args(const _Args&... _Vals) {
1>                ^
1>C:\dev\...\include\fmt\xchar.h(219,1): note: while trying to match the argument list '(std::wstring_view)'
1>void print(std::FILE* f, wformat_string<T...> fmt, T&&... args) {

Looks like the same problem as in #2295, just for wchar_t.

@vitaut
Copy link
Contributor

vitaut commented Dec 9, 2021

A PR to add namespace qualification would be welcome.

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

2 participants