This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Force generation of an uncalled method?
stepleton@gmail.com wrote:
> Thanks, Brian, this is it! For now I am getting by placing something like
> "if(false) debugMethod();" into the constructor. If there is a convention
> for this sort of thing, I'd be happy to know about it.
You should be able to explicitly instantiate it as e.g. "template class
Foo<int>;" which if I understand correctly would tell g++ to compile and
emit bodies for all non-inline methods of Foo<int> at that point.
Brian