C4743 warning on explicit call of a templated function - by Dmitry Me

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 698148 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/31/2011 6:20:20 AM
Access Restriction Public


This behavior is observed in cl.exe 16.00.40219.1

I have this code:

#pragma warning(default:4347)

template <size_t param>
void stuff( int value )

void stuff( int value )
	stuff<4>( value ); //Line 84

that I compile with /W4 and get this output:

1>Test.cpp(84): warning C4347: behavior change: 'void stuff<4>(int)' is called instead of 'void stuff(int)'

that makes no sense. Line 84 explicitly calls a templated function, there's no way a non-templated function would be called here and therefore there's no behavior change. The warning is just wrong.
Sign in to post a comment.
Posted by Microsoft on 1/13/2012 at 8:40 AM
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 MS-Moderator07 [Feedback Moderator] on 10/31/2011 at 7:17 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-Moderator01 on 10/31/2011 at 6:41 AM
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)