A man who experiences sexual attraction towards both men and women is “bisexual” in terms of sexual orientation even if he has only had relationships with women.
A man and a woman who are both attracted only to people of the opposite sex from them share a sexual orientation.
A man who is attracted only to other men is a gay man. A woman who is attracted only to other women is a lesbian. So a gay man and a lesbian share a sexual orientation.