Please note that this can return real references, if T is a reference.
const Foo& GetData(...) { static Foo null_data = Null; ... if(error) return null_data; ... }
Report message to a moderator