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.
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Operating System Language