Actually, it completely depends on your local city codes. I live in Arizona and in my particular city I don't have to have a fence around the pool. But I am required to have all doors leading to the backyard self-closing and self-latching. And any windows leading to the backyard must have a second latch 54" above the finished floor. And of course the backyard has to be fenced in.
Check your local code for options.