Search

VS 2012 C++ template operator->*() causes fatal error C1001 by szpilewski

Closed
as Deferred Help for as Deferred

1
0
Sign in
to vote
Type: Bug
ID: 779237
Opened: 2/14/2013 10:49:25 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I'm getting compiler error:

fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1443)
Details (expand)

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

Visual Studio 2012

Steps to reproduce

//try to compile this code:

class object
{
public:
    void fun_a();
};

template<class object_type>
class ptr
{
public:
     template<class member_type>
     member_type& operator->*(member_type object_type::*p);
};

void fun()
{
    void (object::*member_ptr)() = &object::fun_a;

    ptr<object> p;
    
    (p->*member_ptr)();
}

//end of code

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

Polish

Actual results

fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1443)

Expected results

No internal compiler error
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/14/2013 at 7:59 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 2/14/2013 at 10:54 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.