Oddly enough, it was the US Army that taught me this, over 40 years ago. And while right-wingers are bitching about the Army being used for a "social experiment" regarding integration of gays & lesbians, just as they once did about Blacks in uniform, the truth is the military is much more progressive than the general population.
Because of the very fact that it IS military. You don't get to pick & choose, declare you won't serve next to a Black, or a woman, or a gay, you just do what you're told. And the US military is surprisingly good at educating & explaining why these things are so.
Maybe not in the heat of battle, when you're given an order to take a hill, no questions asked, no time to hesitate, or in Army Basic Training (or its equivalent in the other services) where your NCO trainer makes you jump for no apparent reason.
And so the only criteria I ever used during my career as an Army leader was performance. The rest didn't interest me. I promoted women when that surprised some men.
I ignored if soldiers in my command were obviously gay, and gave them early promotions ahead of others, when they were the best performers, the best SOLDIERS I had. Or if they weren't the best, then others were advanced past them.
There's one RJ member here who consistently says I hurt gay soldiers during my career. He had no evidence for that, just his usual nuttiness. But it does bother me, when others read those lies, because I honestly did use a job-performance basis, as I was duty-bound to do, as the US Army charged me. And gay men & women never were disadvantaged by me, but rather promoted & advanced as their performance merited, not based on their sexual orientation, for the betterment of the US Army. I'm glad the general US public is coming to that same point.