Questions to template overload resolution

2011-04-12 Thread Timon Gehr
1) T foo(T:SomeClass)(T arg){..} It is specified on the main page that this template will match against instantiations with a subclass of SomeClass. Will this also duplicate the code? Or will the template work similar to the function T foo(SomeClass arg){..}? If yes, why should normal functions

Re: Questions to template overload resolution

2011-04-12 Thread Jonathan M Davis
1) T foo(T:SomeClass)(T arg){..} It is specified on the main page that this template will match against instantiations with a subclass of SomeClass. Will this also duplicate the code? Or will the template work similar to the function T foo(SomeClass arg){..}? If yes, why should normal