Ours in on a caged lanai so a fence is not required by law.
Although Mercury thinks of the pool simply as a backdrop for his sunbaths, we do a few things:
1. He's not out on the lanai without us.
2. When we drag him into the pool (against his will), we take him out into the water and then, direct him back to the stairs so he can see where they are.