- Linker errors involving template - 1 Update
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Jan 31 10:14PM On Sat, 31 Jan 2015 14:34:18 -0500 DSF <notavalid@address.here> wrote: [snip] > is removing "virtual" from two of the template functions (the dtor and > Sort) when I read that virtuals in a template are a "no-no." (Putting > them back to virtual made no difference.) I have no idea what is wrong with the way you have organised the rest of your code (probably your build scripts do not properly recompile files which include altered files), but you seem to have misunderstood this last point, because a destructor cannot be a function template to begin with. There is nothing wrong with a template class having a virtual function, including a virtual destructor. What you cannot have is a function template in a class (templated or untemplated) which is virtual. You seem to misunderstand the difference between a non-static function of a template class, which can be virtual, and a function template, which cannot. Chris |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment