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

format-test.cc error in msvc #2474

Closed
phprus opened this issue Aug 30, 2021 · 1 comment
Closed

format-test.cc error in msvc #2474

phprus opened this issue Aug 30, 2021 · 1 comment

Comments

@phprus
Copy link
Contributor

phprus commented Aug 30, 2021

Commit: 74c1118
MSVC: 19.21.27702.2

Error:

[  8%] Building CXX object fmt/test/CMakeFiles/format-test.dir/format-test.cc.obj
        cd F:\...\build\target_w32.19\fmt\test
        "C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\format-test.dir\format-test.cc.obj.d --working-dir=F:\...\build\target_w32.19\fmt\test --filter-prefix="Note: including file: " -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1421~1.277\bin\HostX86\x86\cl.exe @
C:\Users\phprus\AppData\Local\Temp\nm942C.tmp
Microsoft (R) C/C++ Optimizing Compiler Version 19.21.27702.2 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl   /TP -DFMT_LOCALE -DGTEST_HAS_STD_WSTRING=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -D_WIN32_WINNT=0x0601 -IF:\...\3rdparty\fmt\src\include -IF:\...\3rdparty\fmt\src\test\gtest\. /DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /arch:SSE2 /Ox /Ob2 /DNDEBUG /Zi -MD /GL /bigobj -std:c++17 /showIncludes /FoCMakeFiles\format-test.dir\format-test.cc.obj /FdCMakeFiles\format-test.
dir\ /FS -c F:\...\3rdparty\fmt\src\test\format-test.cc

format-test.cc
F:\...\3rdparty\fmt\src\include\fmt\core.h(1659): error C2338: Cannot fo
rmat an argument. To make type T formattable provide a formatter<T> specializati
on: https://fmt.dev/latest/api.html#udt
F:\...\3rdparty\fmt\src\include\fmt\core.h(1780): note: see reference to
 function template instantiation 'fmt::v8::detail::value<Context> fmt::v8::detai
l::make_arg<true,Context,fmt::v8::detail::type::custom_type,string_viewable&,0>(
T)' being compiled
        with
        [
            Context=fmt::v8::format_context,
            T=string_viewable &
        ]
F:\...\3rdparty\fmt\src\include\fmt\core.h(1802): note: see reference to
 function template instantiation 'fmt::v8::format_arg_store<fmt::v8::format_cont
ext,string_viewable>::format_arg_store<string_viewable&>(string_viewable &)' bei
ng compiled
F:\...\3rdparty\fmt\src\include\fmt\core.h(1803): note: see reference to
 function template instantiation 'fmt::v8::format_arg_store<fmt::v8::format_cont
ext,string_viewable>::format_arg_store<string_viewable&>(string_viewable &)' bei
ng compiled
F:\...\3rdparty\fmt\src\include\fmt\core.h(2978): note: see reference to
 function template instantiation 'fmt::v8::format_arg_store<fmt::v8::format_cont
ext,string_viewable> fmt::v8::make_format_args<fmt::v8::format_context,string_vi
ewable&>(string_viewable &)' being compiled
F:\...\3rdparty\fmt\src\test\format-test.cc(1415): note: see reference t
o function template instantiation 'std::string fmt::v8::format<string_viewable>(
fmt::v8::basic_format_string<char,string_viewable>,string_viewable &&)' being co
mpiled
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019
\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x86\nmake.exe"' : return code '
0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019
\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x86\nmake.exe"' : return code '
0x2'
Stop.
phprus added a commit to phprus/fmt that referenced this issue Aug 31, 2021
@phprus
Copy link
Contributor Author

phprus commented Aug 31, 2021

MSVC: 19.16 - OK
MSVC: 19.21 - Error
MSVC: 19.22 - OK

I think this is a compiler bug.

Workaround: #2476

vitaut pushed a commit that referenced this issue Aug 31, 2021
@vitaut vitaut closed this as completed Aug 31, 2021
PoetaKodu pushed a commit to pacc-repo/fmt that referenced this issue Nov 11, 2021
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