Depends on the restroom. If a man tried that in a women's room in a US airport or shopping mall, he'd be arrested. Yet in those same places, I've had women enter and use the men's with me and other men standing there peeing. It's very common in sports stadiums, where women feel justified because many of these older places were built on a male-to-female attendance ratio that no longer holds true, and the women find themselves in long lines to use their restrooms, especially at non-sporting events like concerts.
At a gay place like Georgie's Alibi in Wilton Manors, FL, however, some guys ALWAYS use the ladies, whose door is left wide open, just like the men's. There aren't too many women ever in the place anyway.
At a lesbian nightclub in St. Paul, MN, there was no men's room, just a unisex, plus another for women only. The men simply had to use urinals alongside the sinks, no partitions, no privacy, with women all around. The lesbians seemed to want it that way, and the men went along with it. Either that, or piss in the parking lot.
So sometimes the lines get blurred, and it's OK to go unisex. But get it wrong, and you'll be facing a charge for public indecency. The man, that is, never the woman.