But what if some hack comes along and throws an uninitialized int into my beautiful function?
Then Unexpected Behavioryou get Undefined Behavior, and your default will be meaningless. There's nothing that you can possibly do to make this any better.
Edit: Let me be more clear. The instant someone passes an uninitialized intint into your function, it is UnexpectedUndefined Behavior. Your function could solve the Halting Problem and it wouldn't matter. It is UB. There is nothing you can possibly do once UB has been invoked.