Argument dependent lookup chooses the wrong function inside sizeof statements - by Fred Sundvik

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 634966 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/6/2011 3:00:19 PM
Access Restriction Public


This applies to c++

Inside a sizeof statemen, when there's a template mebmer function, and another function outside the class with the same name, the compiler sometimes wrongly chooses the outside one. 

More specifcally, it always chooses the function from a namespace matching it's argument, even if the member function is explicitely specified as shown in the example code. If the outside function doesn't have the correct signature for the parameter, then a compiler error is generated.
Sign in to post a comment.
Posted by Fred Sundvik on 1/19/2011 at 2:02 PM
In which version of visual studio will this be fixed?

Just checking that the problem is actually fixed, instead of just being automatically closed because of no activity, or not being able to repeat.
Posted by Microsoft on 1/6/2011 at 9:15 PM
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.
Posted by Microsoft on 1/6/2011 at 3:14 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(