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

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 619198 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/4/2010 1:25:24 AM
Access Restriction Public


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.
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.