Closed yuxianch closed 2 years ago
I cannot reproduce:
G:\boost_1_78_0>type test.cpp
#include <boost/spirit/home/support/info.hpp>
G:\boost_1_78_0>clang-cl -c test.cpp -TP /Z7 /Od /Ob0 /W3 /GR /MDd /EHs /std:c++14 -I.
G:\boost_1_78_0>clang-cl -c test.cpp -TP /Z7 /Od /Ob0 /W3 /GR /MDd /EHs /std:c++latest -I.
G:\boost_1_78_0>clang-cl -c test.cpp -TP /Z7 /Od /Ob0 /W3 /GR /MDd /EHs /std:c++latest -I. -v
clang version 13.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
(in-process)
"C:\\Program Files\\LLVM\\bin\\clang-cl.exe" -cc1 -triple x86_64-pc-windows-msvc19.30.30706 -emit-obj -mrelax-all -mincremental-linker-compatible --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=none -relaxed-aliasing -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -mllvm -x86-asm-syntax=intel -tune-cpu generic -D_DEBUG -D_MT -D_DLL --dependent-lib=msvcrtd --dependent-lib=oldnames -stack-protector 2 -fcxx-exceptions -fexceptions -fms-volatile -fdiagnostics-format msvc -gno-column-info -gcodeview -debug-info-kind=constructor -v "-fcoverage-compilation-dir=G:\\boost-repo" -resource-dir "C:\\Program Files\\LLVM\\lib\\clang\\13.0.0" -I . -internal-isystem "C:\\Program Files\\LLVM\\lib\\clang\\13.0.0\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\include" -internal-isystem "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\atlmfc\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt" -O0 -Wall -fdeprecated-macro "-fdebug-compilation-dir=G:\\boost-repo" -ferror-limit 19 -fmessage-length=120 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.30.30706 -std=c++2b -fdelayed-template-parsing -fno-inline -fno-implicit-modules -fcolor-diagnostics -faddrsig -o test.obj -x c++ test.cpp
clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-pc-windows-msvc
#include "..." search starts here:
#include <...> search starts here:
.
C:\Program Files\LLVM\lib\clang\13.0.0\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\atlmfc\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\winrt
End of search list.
The issue can be only reproduced with developed version of clang-cl compiler. Close the issue as it could be compiler issue.
Summary
Fail to compile spirit/home/support/info.hpp with /std:c++latest on VS2022 for error: field has incomplete type 'boost::spirit::info'.
Detail
test.cpp:
Use clang-cl to compile test.cpp and it is failed when compiling with /std:c++latest on VS2022:
Related code: https://github.com/boostorg/spirit/blob/166e71ae364915678bd9e1052f1347b8f5578283/include/boost/spirit/home/support/info.hpp#L22-L29