This is what the 2003 IRC has to say:
Where a wall of a dwelling serves as part of the barrier one of the following conditions shall be met:
9.1. The pool shall be equipped with a powered safety cover in compliance with ASTM F1346; or
9.2. All doors with direct access to the pool through that wall shall be equipped with an alarm which produces an audible warning when the door and its screen, if present, are opened. The alarm shall sound continuously for a minimum of 30 seconds immediately after the door is opened and be capable of being heard throughout the house during normal household activities. The alarm shall automatically reset under all conditions. The alarm system shall be equipped with a manual means, such as touchpad or switch, to temporarily deactivate the alarm for a single opening. Such deactivation shall last for not more than 15 seconds. The deactivation switch(es) shall be located at least 54 inches (1372 mm) above the threshold of the door; or
9.3. Other means of protection, such as self–closing doors with self–latching devices, which are approved by the governing body, shall be acceptable so long as the degree of protection afforded is not less than the protection afforded by Item 9.1 or 9.2 described above.
Hope this helps
Earl