My solution: Everyone living alone in a studio/one bedroom apartment takes in a roommate and shares the same bed. Gay/straight-doesn’t matter. Market forces will end the homeless problem. Plus they’ll be a whole lot happier!
You’re going to start seeing more extended families living together.