Search

Unexpected error for legal code by J Kanze

Closed
as Fixed Help for as Fixed

3
0
Sign in
to vote
Type: Bug
ID: 668375
Opened: 5/13/2011 8:21:24 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
2
User(s) can reproduce this bug
Attached program (which is legal C++) triggers an unexpected error "error C2893: Failed to specialize function template 'std::vector<Op::result_type> g(Op,It1,It1,It2)'". Almost any change in the code will make it work: swap the order of the two overloads of 'g' or add a "using std::vector;", then delete all of the "std::", etc.
Details (expand)

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

Visual Studio 2010 SP1

Steps to reproduce

Compile the attached code. (I just use "cl /EHs /c VC10Error.cpp". Creating a project with all the default options works as well.)

Product Language

English

Operating System

Windows XP

Operating System Language

English

Actual results

Fails to compile

Expected results

Generates an executable
File Attachments
File Name Submitted By Submitted On File Size  
VC10Error.cpp 5/13/2011 708 bytes
Sign in to post a comment.
Posted by Microsoft on 6/11/2011 at 7:27 PM
Hi:
    A fix for this issue has been checked into the compiler sources.
    The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Compiler Team
Posted by MS-Moderator07 [Feedback Moderator] on 5/15/2011 at 8:33 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 MS-Moderator07 on 5/15/2011 at 6:24 PM

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.