fixes the problem on gcc. However, Microsoft Visual Studio 2005 (unmanaged C++) complains:
error C2059: syntax error : 'template'
...
Does the MS compiler not allow this use of template? I'd like to avoid converting the this->template to a macro and #defining to do the correct thing on the different platforms but I don't see another way.