Re: Overriding Template Methods

2012-01-29 Thread H. S. Teoh
On Sun, Jan 29, 2012 at 06:43:39PM -0800, Ali Çehreli wrote: [...] > Template member functions cannot be virtual. > > One quick reason why this is so is that Derived.writeValueType would > have to be instantiated by the compiler, for every possible type in > the program. This would lead to almost

Re: Overriding Template Methods

2012-01-29 Thread Daniel L. Alves
Hey, thank you very much for the explanation! Daniel

Re: Overriding Template Methods

2012-01-29 Thread Ali Çehreli
On 01/29/2012 06:23 PM, Daniel L. Alves wrote: > Hi, > I don't know if this is a bug or if I'm doing something wrong, but I'm not > being able to override template methods. This can be seen with this simple code: > > class Base > { > void writeValueType( T )( T value ) > { >