microsoft / Range-V3-VS2015

A fork of the popular range-v3 C++ library with support for the Visual Studio 2015 Update 3 VC++ compiler.
Other
115 stars 22 forks source link

VS2017 ICE #17

Closed egorpugin closed 7 years ago

egorpugin commented 7 years ago

#include <range/v3/all.hpp> gives

3>\include\meta/meta.hpp(621): error C2938: 'invoke<T::type>' : Failed to specialize alias template
3>\include\meta/meta.hpp(621): error C2794: 'invoke': is not a member of any direct or indirect base class of 'meta::v1::id<void>'
3>\include\meta/meta.hpp(621): error C2938: 'invoke<meta::v1::id<void>,T::type>' : Failed to specialize alias template
3>\include\meta/meta.hpp(621): error C2938: 'void_<T::type>' : Failed to specialize alias template
3>\include\meta/meta.hpp(624): error C2976: 'meta::v1::detail::is_trait_': too few template arguments
3>\include\meta/meta.hpp(621): note: see declaration of 'meta::v1::detail::is_trait_'
3>\include\meta/meta.hpp(633): error C2938: 'invoke<meta::v1::quote<T::invoke>>' : Failed to specialize alias template
3>\include\meta/meta.hpp(633): error C2794: 'invoke': is not a member of any direct or indirect base class of 'meta::v1::id<void>'
3>\include\meta/meta.hpp(633): error C2938: 'invoke<meta::v1::id<void>,meta::v1::quote<T::invoke>>' : Failed to specialize alias template
3>\include\meta/meta.hpp(633): error C2938: 'void_<meta::v1::quote<T::invoke>>' : Failed to specialize alias template
3>\include\meta/meta.hpp(636): error C2976: 'meta::v1::detail::is_callable_': too few template arguments
3>\include\meta/meta.hpp(633): note: see declaration of 'meta::v1::detail::is_callable_'
3>\include\meta/meta.hpp(667): fatal error C1903: unable to recover from previous error(s); stopping compilation
3>INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\CL.exe'
3>    Please choose the Technical Support command on the Visual C++
3>    Help menu, or open the Technical Support help file for more information
CaseyCarter commented 7 years ago

I can't reproduce this. In a VS2017 x86-native tools window:

C:\Users\cacarter\Desktop>git clone https://github.com/Microsoft/Range-V3-VS2015
Cloning into 'Range-V3-VS2015'...
remote: Counting objects: 20237, done.
remote: Compressing objects: 100% (3877/3877), done.
remote: Total 20237 (delta 2850), reused 0 (delta 0), pack-reused 16110
Receiving objects: 100% (20237/20237), 6.66 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (14811/14811), done.

C:\Users\cacarter\Desktop>type repro.cpp
#include <range/v3/all.hpp>

int main() {}

C:\Users\cacarter\Desktop>cl /EHsc /I Range-V3-VS2015\include repro.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

repro.cpp
Microsoft (R) Incremental Linker Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:repro.exe
repro.obj

Are you certain you are including the Range-V3-VS2015 headers, and not some other copy of e.g. the upstream range-v3 headers?

egorpugin commented 7 years ago

It seems I tried to use 0.2.1 tag instead of master. Aren't tags should work? Or only master branch is fine?

Sorry, closing this.

CaseyCarter commented 7 years ago

No need to apologize, that's totally my mistake. Those tags are from upstream range-v3, and should not even be in this repo so as to avoid exactly this kind of confusion. I've removed these upstream version tags to avoid recurrence. Thanks for the report ;)