Templated functions cannot have default type arguments, however it is easily worked around by making your function a static member of a templated empty class which can have default type arguments.
At least i think thats what you meant.Code:template < typename T = int > struct FuncHolder { static void TestEmpty( T obj ) { // ..... } };




Reply With Quote