Home Dashboard Directory Help
Search

implicit instantiation of virtual template method causes confusing warning by Krishty


Status: 

Closed
 as Deferred Help for as Deferred


8
0
Sign in
to vote
Type: Bug
ID: 778490
Opened: 2/4/2013 11:29:49 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

It looks like calling the virtual method of a template causes all of its virtual methods being instantiated. According to the C++ standard, this is alright.

However, if one of the methods was defined outside of the class, warning C4505 (unreferenced local function has been removed) is raised. I suppose this is due to Visual C++ omitting the needless virtual functions it instantiated right before.

The warning is pretty confusing and should either be changed or disabled.
Details
Sign in to post a comment.
Posted by Microsoft on 2/4/2013 at 9:54 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 Microsoft on 2/4/2013 at 11:51 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.