Solving homelessness isn't an on/off switch; people are still going to need a toilet while homelessness is being "fixed".
(It's a problem with saying why not solve X instead? You end up with neither fixed, and everybody loses. I mean, why solve homelessness when there are hungry kids that need feeding? And so the cycle continues.)
As an aside, I'm not convinced that it's homeless people per se that are the problem; it's people with issues that abuse public toilets, whether through drugs, alcohol or being a general malcontent, and "the homeless" get blamed as convenient name.
It's not like corporate headquarters are invulnerably to toilet abuse, least of all from the execs.
Hence my comment - if you're worried about homeless people in your precious toilet, you (as a city/society) have bigger problems than public toilets.
...it can actually be cheaper in the end to give homeless
people homes than to keep them homeless.
Here's a source:"The surprisingly simple way Utah solved chronic homelessness and saved millions" - http://www.washingtonpost.com/news/inspired-life/wp/2015/04/...
That's not necessarily the best source - it just happened to be towards the top of the following SERP, which finds quite a few articles: https://www.google.com/search?q=give+homeless+homes
If you have so many homeless people, maybe you should solve that problem first?