This is a deck that we built in Glastonbury CT. It is framed with pressure treated lumber and surfaced with composite decking material. The railing and gate are built with pressure treated lumber. The building code for a deck attached to a pool requires a self closing gate that must swing outward from the pool. The gate has to be at least 48″ tall measured on the side away from the pool area.
Guidelines for Residential Swimming Pools, Spas and Hot Tub – Link for an informational handout from the State of Connecticut – Department of Public Safety – Office of State Building Inspector
The handout explains the building code requirements for barriers on residential swimming pools.