@Radd advice is good, but I disagree with asking if he has a girlfriend or boyfriend. That's too forward. Just ask, "are you seeing anyone". Don't include special, girlfriend/boyfriend, etc. most straight guys know when a gay guy is dropping hints (my experience)...but it takes a couple hints before they get it.
Personally though, if it's been two years...and you guys haven't pinged each other on Grindr or scruff or whatever else by now, leave it alone. Too much risk of embarrassment involved. Despite people being more exposed to gayness and coming out, there's still people out there who harbor feelings of "sin" towards gays, and even though it may not result in violence (if it does, that'll make for a nice lawsuit!), sometimes it's just not worth the feelings of shame.
I once hit on a guy at the gym, where we exchanged numbers and everything. After a few texts over a couple days, he picked up the "hint" and stated he's not (verbatim) homosexual or bisexual (which I thought was kinda degrading despite him trying to use the polite terminology) . I was hurt, embarrassed, and glad I was only visiting and never needed to return to that gym again.
Not saying every interaction will turn out like that, but in my experience most of them do. If I can make a living as a male-client only escort, AND meet guys for free when I'm not AND never having to approach random men in public, then it's safe to say you're not missing out on anything by not riski your dignity and speaking to him.
Sorry to sound so harsh, it's just I've had to learn the hard way too many times...most men you come across on a daily base will be straight, even if you never see them with a woman. I even had one guy approach me at my old apartment complex who I swore was gay...until he started going on and on about his girlfriend when we hung out.
For the straight men who "play around" with guys, most of that is on Craigslist and escort sites. I meet lots of married guys, non of who would probably approach me in real life. If you wish to try it out, do like Radd said and keep it very friendly but non attractive...if he's game or not, you'll find out soon enough. You don't even have to ask the pertinent questions either