This code: class MyClass { public: int SomeMethod () {
} } void main() { } gets a compile error:Error: function test_warnings.MyClass.SomeMethod has no return statement, but is expected to return a value of type int
but if I make it a template class: class MyClass(T) {there is no compile error. I don't know why the error isn't given for the template code as well.