If you eat the cake, you obviously do not have it to eat anymore.

Therefore, you cannot have your cake and eat it.

Unless of course you’re bulimic. Nevertheless, that is another matter ; )