It depends on the persons.
My ex-husband is a very good friend of ours. We had a period while we were divorcing in which it was not easy. But we always were decided that when we chose to get married we chose an interesting person- and I suppose we both were not ready to think bad of our judgment (You know, when people say "What an *?&%?X* my ex is" you always wonder why they didn't notice it earlier).

So after we were separated we kept in contact and have so ever after. He and his wife have stayed at our place and we at theirs. Didier (my ex) still is in the area where I am from and after the death of my dad he helped me with my mom (and we are divorced now 25 years)- he got her a new TV set when hers broke down and even went with her to see the lawyers when she sold our house and I could not come as often as needed as it is 400 miles away.

I am also still friends with old boyfriends of mine- I think the men in my life are a very fine collection (small but precious ).