To further clarify (or muddy) the picture, this is what the
International Plumbing Code says on the subject:
403.2 Separate facilities. Where plumbing fixtures are
required, separate facilities shall be provided for each sex.
Exceptions:
1. Separate facilities shall not be required for dwelling
units and sleeping units.
2. Separate facilities shall not be required in structures
or tenant spaces with a total occupant load, including
both employees and customers, of 15 or fewer.
3. Separate facilities shall not be required in mercantile
occupancies in which the maximum occupant
load is 100 or fewer.
Of course, so far the IPC hasn't caught up with the new wave of political correctness, so they don't include a definition of "sex." Which means, as far as code enforcement is concerned, most building and plumbing inspectors still look for a "men's" room and a "women's" room. But the inspectors don't have any say in who is allowed to use said separate-by-sex facilities -- they just have to verify that they have been provided (unless the building meets one of the three exceptions).
I think the solution lies in the next paragraph of the IPC:
403.2.1 Family or assisted-use toilet facilities serving as
separate facilities. Where a building or tenant space
requires a separate toilet facility for each sex and each toilet
facility is required to have only one water closet, two
family/assisted-use toilet facilities shall be permitted to
serve as the required separate facilities. Family or assisted use
toilet facilities shall not be required to be identified for
exclusive use by either sex as required by Section 403.4.
In other words, make everything a one-holer. Of course, larger buildings requiring multiple toilets won't like that because it wastes more space. But more and more malls and other large venues now offer a "family" toilet room, either for parents accompanying other-sex children or for adults accompanying an elederly or otherwise incapacitated person whe requires assistance. These "family" toilet rooms are not gender-specific. I think so-called "transgender" people who are not really transgender (like Bruce/Caitlyn) should be required to use the separate, "family" toilet rooms.
Of course, they'll claim they are being discriminated against.