Home Dashboard Directory Help
Search

[c++] Compiler fails to deduce template parameter. by Cory Nelson


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 619198
Opened: 11/4/2010 1:25:24 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The attached reproduction code uses tags and template argument deduction to pull base classes out of a derived class. It is 100% legal C++, and compiles fine in GCC (tested with v4.5.1).

The first use of the "get" function works just as expected, but for some reason the second produces two identical C2784 errors, followed by a single C2782 error. These errors are incorrect -- the template arguments are in no way ambiguous.

Interestingly enough, IntelliSense is able to deduce the types correctly.
Details
Sign in to post a comment.
Posted by Cory Nelson on 2/6/2011 at 5:49 AM
Will this fix be in 2010 SP1, or will we have to wait for whatever is next?
Posted by Microsoft on 11/4/2010 at 2:09 AM
Thanks for your feedback. We are routing 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.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
cxxtest.cpp 11/4/2010 453 bytes