Search

&decltype(obj)::member doesn't work by wfunc

Closed
as Deferred Help for as Deferred

2
1
Sign in
to vote
Type: Bug
ID: 774053
Opened: 12/11/2012 10:49:59 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
this should work, but doesn't:

    struct Adder
    {
        int foo() { return 0; }
    };
    
    int main()
    {
        &decltype(Adder)::foo;
    }
Details (expand)

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

Visual Studio 2012

Steps to reproduce

Try to compile the code above.

Product Language

English

Operating System

Any

Operating System Language

English

Actual results

error C2226: syntax error : unexpected type 'Adder'
error C3553: decltype expects an expression not a type
error C2062: type 'int' unexpected
error C2039: 'foo' : is not a member of '`global namespace''

Expected results

Compiles correctly.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 12/11/2012 at 11:53 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 12/11/2012 at 11:51 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.