You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI, I can't compile the current version of mdspan when using clang-cl.exe that ships with Visual Studio 2019 (LLVM clang version 9.0). The first couple of build errors are shown below.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\Llvm\bin\clang-cl.exe /c /Z7 /nologo /W0 /WX- /diagnostics:column /FS /Od /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_DEPRECATE /D _SECURE_SCL=0 /D DEBUG /D _DEBUG/MDd /D _DEBUG /D _HAS_ITERATOR_DEBUGGING=0 /D __STDC_CONSTANT_MACROS /D _POSIX_C_SOURCE=200112 /D _XOPEN_SOURCE=600 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /EHa /MDd /GS /Gy /fp:precise /std:c++14 /Fo"Ut_experimental_tst_mdspan_exe.dir\Debug\\" /Gd /TP -m64 /Zc:__cplusplus C:\work\KineticTheory\Draco\src\experimental\test\tst_mdspan.cc
In file included from C:\work\KineticTheory\Draco\src\experimental\test\tst_mdspan.cc:12:
In file included from C:\work\KineticTheory\Draco\src\experimental/mdspan:61:
C:\work\KineticTheory\Draco\src\experimental\__p0009_bits\array_workaround.hpp(112,3): error : too many arguments provided to function-like macro invocation
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(150,3): message : expanded from macro 'MDSPAN_FUNCTION_REQUIRES' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(158,17): message : expanded from macro 'MDSPAN_TEMPLATE_REQUIRES' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(124,29): message : expanded from macro 'MDSPAN_PP_CAT' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
(107,1): message : expanded from here [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(170,17): message : expanded from macro 'MDSPAN_TEMPLATE_REQUIRES_2' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(147,35): message : expanded from macro 'MDSPAN_CLOSE_ANGLE_REQUIRES' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(123,9): message : macro 'MDSPAN_PP_CAT_IMPL' defined here [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
In file included from C:\work\KineticTheory\Draco\src\experimental\test\tst_mdspan.cc:12:
In file included from C:\work\KineticTheory\Draco\src\experimental/mdspan:61:
C:\work\KineticTheory\Draco\src\experimental\__p0009_bits\array_workaround.hpp(112,3): error : unknown type name 'MDSPAN_PP_CAT_IMPL'
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(150,3): message : expanded from macro 'MDSPAN_FUNCTION_REQUIRES' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(158,3): message : expanded from macro 'MDSPAN_TEMPLATE_REQUIRES' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\KineticTheory\Draco\src\experimental/__p0009_bits/macros.hpp(124,29): message : expanded from macro 'MDSPAN_PP_CAT' [C:\work\vs2019-x64-Clang-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
In file included from C:\work\KineticTheory\Draco\src\experimental\test\tst_mdspan.cc:12:
In file included from C:\work\KineticTheory\Draco\src\experimental/mdspan:61:
The text was updated successfully, but these errors were encountered:
Hmmm...this is interesting. It looks to me like clang-cl.exe may think that it's MSVC when it comes to preprocessing (since MSVC has some weird preprocessor behavior I had to account for). I don't have easy access to a Windows machine to test this, but I'll poke around and see what I can find.
This was fixed in pull request #25. The problem was that clang sets the _MSC_VER variable even though it actually has a working C preprocessor, unlike MSVC.
FYI, I can't compile the current version of mdspan when using
clang-cl.exe
that ships with Visual Studio 2019 (LLVM clang version 9.0). The first couple of build errors are shown below.The text was updated successfully, but these errors were encountered: