Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 698148
Opened: 10/31/2011 6:20:20 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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.
Details
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)
Sign in to post a workaround.