> On 16 Feb, 16:19, "easy" <chris.mich
@lmco.com> wrote:
> > The following is a much simplified version of some code that is
> > refusing to compile. Is there anything technically wrong with the
> > code?
> > class ClassWithTemplateFunction
> > {
> > public:
> > template<class T> inline void SomeSillyFunction(T value) const
> > {
> > }
> > };
> > template <typename T> void TemplateFunction( ClassWithTemplateFunction
> > & rC, T value)
> > {
> > rC.SomeSillyFunction< T >( value );
> > }
> > int main()
> > {
> > ClassWithTemplateFunction C;
> > int value = 0;
> > TemplateFunction<int>(C, value);
> > return 0;
> > }
> > The error I get from the compiler is " Parse error before '>' " on the
> > line: rC.SomeSillyFunction< T >( value );
> > Any help would be appreciated.
> What compiler are you using?
> Using MS Visual Studio 2005 your code compiles with no errors and when
> I step through in the debugger it follows the expected path. Also, the
> code compiles without errors in Comeau online (can't execute it there
> to see what happens).
> Gavin Deane- Hide quoted text -
>
compiler = gcc 3.3.5