Search

Nov CTP [Milan] - ICE with non-type default template argument on a function template by _xeo

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 780779
Opened: 3/6/2013 5:33:42 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
The compiler error's out with an ICE when accessing a non-constexpr static member function in a non-type default template argument.

The below code triggers the ICE.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

#include <iostream>

template<class T>
struct X{
template<bool = T::f()>
static void foo(int){ std::cout << "foo(int)"; }
static void foo(...){ std::cout << "foo(...)"; }
};

struct Y{
static bool f(){ return true; }
};

int main(){
X<Y>::foo(0);
}

Product Language

German

Operating System

Windows 7 SP1

Operating System Language

German

Actual results

1>src\main.cpp(15): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1453)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information

Expected results

Successful compilation.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 5/13/2013 at 10:52 AM
Hi Xeo,

It looks like your sample compiles successfully using our latest internal compiler. The fix should be available in the next major release. Thank you very much for reporting this issue.

Jamie Eckman
Visual C++ Team
Posted by Microsoft on 3/6/2013 at 9:57 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 3/6/2013 at 5:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.