Incorrect deduction when taking the address of an instantiated member function template using a template type - by eldiener

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 651762 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 3/16/2011 7:24:26 AM
Access Restriction Public


When taking the address of an instantiated  member function template where the enclosing type is being passed as a template type parameter, VC++ 10 does consider the erxpression valid.
Sign in to post a comment.
Posted by Jonathan [MSFT] on 9/22/2011 at 10:40 PM
Hi: this issue has been fixed. The fix should show up in a future release of Visual C++.

Thank you for reporting the issue.

Jonathan Caves
Visual C++ Compiler Team
Posted by Stephan [MSFT] on 6/23/2011 at 4:00 PM
I have reactivated this bug in our internal database (DevDiv#161662). It still appears as Resolved on Connect because I don't know how to change that.

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by eldiener on 6/2/2011 at 12:27 PM
Once again, you have specified that this is "Resolved as By Design" on completely false pretences. Your analyses is obviously flawed and the only justification for such a flawed analyses is that you want to claim that an obvious bug in your C++ compiler is "by design". Please take a look at this again rather than falsely closing a bug report because of the horrible incompetence of one Tanveer Gani of your Visual C++ team.
Posted by eldiener on 5/26/2011 at 8:23 AM
It does not "reduce" to the example below. In my longer example in TTest2 the 'check' function gets passed its U parameter so it does not have to deduce it.
Posted by Tanveer [MSFT] on 5/25/2011 at 6:12 PM
Thank you for contacting us. Your repro reduces to this:

struct AType
     template<class X> double SomeFuncTemplate();
template <class T,class C> struct TTest2
     template<T> struct helper;
     template<class U> static void check(helper<&U::template SomeFuncTemplate<int> > *);
int main()
     TTest2<double (AType::*)(), AType>::check(0);

There is no way for the compiler to deduce "U" since a non-deduced context is involved. Please see, para 4 in the ISO Standard.


Tanveer Gani
Visual C++ Team.
Posted by Microsoft on 3/16/2011 at 7:56 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 3/16/2011 at 8:13 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(