Search

Correct code doesn't compile by VinnieFalco

Closed
as Deferred Help for as Deferred

1
0
Sign in
to vote
Type: Bug
ID: 771509
Opened: 11/17/2012 1:05:41 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
// This code fails to compile in Visual Studio 2010 and Visual Studio 2012
struct S {
template <class T> inline operator T () const { return T (); }
};
int main () {
S () || false;
return 0;
}
Details (expand)

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

Visual Studio 2012

Steps to reproduce

Compile the code sample using C++.

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

English

Actual results

Compilation error:

"binary '||': 'S' does not define this operator or a conversion to a type acceptable to the predefined operator"

Expected results

No compilation error. RE: http://codepad.org/vupdcWdi
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 11/19/2012 at 9:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Microsoft Visual Studio Connect Support Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 11/19/2012 at 9: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.