On Mon, 09 Mar 2009 00:58:14 +1300, Michel Fortin <[email protected]> wrote:


If you introduce a way to limit templates to what generics can do in Java and C#, you can have virtual template functions. Java and C# generics can do only do a subset of what templates can do, but this ensure there's only one compiled code instanciation. So perhaps non-final non-static member template functions could be constrained to generic-like operations and thus could become virtual.

I remembrer myself proposing this a few months ago, but it didn't caught on.




I remember you blogging about a way of compiling base classes with new methods and not needing to recompile the sub classes, I will read up on those genrics in C# and java later. If that doesn't work out, what if the compiler could check for all sub class functions within the same module and allowing a sort of limited virtual template functions, so no work through external libraries. I would prefer limited virtual over no virtual.

Reply via email to