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

ICE with VisualStudio 16.5.4 #23

Closed
BobSteagall opened this issue Apr 23, 2020 · 6 comments
Closed

ICE with VisualStudio 16.5.4 #23

BobSteagall opened this issue Apr 23, 2020 · 6 comments

Comments

@BobSteagall
Copy link

#include <experimental/mdspan> in an otherwise empty source file yields the following set of error messages and an ICE:

1>------ Build started: Project: lin_alg_test, Configuration: Debug x64 ------
1>pch.cpp
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(64,1): error C2371: 'std::is_assignable_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(683): message : see declaration of 'std::is_assignable_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(65,1): error C2371: 'std::is_constructible_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(636): message : see declaration of 'std::is_constructible_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(66,1): error C2371: 'std::is_convertible_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(473): message : see declaration of 'std::is_convertible_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(67,1): error C2371: 'std::is_default_constructible_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(654): message : see declaration of 'std::is_default_constructible_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(68,1): error C2371: 'std::is_trivially_destructible_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(822): message : see declaration of 'std::is_trivially_destructible_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(69,1): error C2371: 'std::is_same_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xtr1common(79): message : see declaration of 'std::is_same_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(70,1): error C2371: 'std::is_empty_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(536): message : see declaration of 'std::is_empty_v'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\trait_backports.hpp(71,1): error C2371: 'std::is_void_v': redefinition; different basic types
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\type_traits(156): message : see declaration of 'std::is_void_v'
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xstring(4246,5): error C2976: 'std::_Compressed_pair': too few template arguments
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xmemory(1319): message : see declaration of 'std::_Compressed_pair'
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xstring(4555): message : see reference to class template instantiation 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' being compiled
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xstring(4246,3): error C2955: 'std::_Compressed_pair': use of class template requires template argument list
1>C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\include\xmemory(1319): message : see declaration of 'std::_Compressed_pair'
1>D:\Repos\wg21\linear_algebra\code\extsrc\mdspan\include\experimental\__p0009_bits\basic_mdspan.hpp(264,1): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>INTERNAL COMPILER ERROR in 'C:\DevTools\VisualStudio\2019\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\CL.exe'
1>    Please choose the Technical Support command on the Visual C++
1>    Help menu, or open the Technical Support help file for more information
1>Done building project "lin_alg_test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
@crtrott
Copy link
Member

crtrott commented Apr 23, 2020

Wait is this VisualStudio 16 or 19? or is the versioning just weird?

@BobSteagall
Copy link
Author

This is Visual Studio Community 2019 (product name), version number 16.5.4 (i.e., the latest, at least as of last week). It's MS's numbering convention, sorry for any confusion.

@BobSteagall
Copy link
Author

Yes, their numbering is weird, at least to me.....

@crtrott
Copy link
Member

crtrott commented Apr 24, 2020

Ok we identified that __cplusplus is the problem: This thing asserts this MSVC:

static_assert(__cplusplus >= 201102L, "__cplusplus is too small: MDSpan requires C++11 or later.");

__cplusplus is defined to 199711L right now even though the compile line includes -std:c++latest.

@crtrott
Copy link
Member

crtrott commented Apr 24, 2020

crtrott added a commit that referenced this issue Apr 24, 2020
in particular issue #23 and a problem with accessing public static members of private base classes. We still need to fix warnings, but the examples now compile under MSVC 16.5.0

Also adding gitignore file
dhollman pushed a commit that referenced this issue Apr 24, 2020
in particular issue #23 and a problem with accessing public static members of private base classes. We still need to fix warnings, but the examples now compile under MSVC 16.5.0

Also adding gitignore file
@dhollman
Copy link
Contributor

Pull request #25 should have addressed this. Thanks for reporting this, and please let us know if you have any other issues!

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

3 participants