you could do something like this with a template function
not sure what you hope to achieve with this though...Code:template <typename RETURN_TYPE> RETURN_TYPE DoSomething(void) { RETURN_TYPE result = RETURN_TYPE(); // calls default ctor (works for pods too) return result; }