When I was younger, in shorter (and I guess less meaningful) relationships, cheating was always a deal-breaker and it's something I've never done.
Now, I've been married for about six years and we do discuss this kind of thing, it wouldn't be a deal breaker for myself or my wife. But it would really hurt. The thing we both say about it is this:
If it was 'just sex' - well, I guess you can get over it, if however it is falling in love with someone else and having an ongoing 'affair' - well, first it brings the question of whether the cheater actually wants to stay married, but if they do - then that is certainly a lot more hurtful and a much bigger hurdle to jump.
That said, my wife & I would try and work through anything, I suppose once you're married and really love someone, you accept that the relationship will have some tough times and there will be something (not necessarily sex) along the way the feels like a betrayal.
The issue my wife & I have is this: neither of us are into 'casual sex' - which on one hand is great; neither of us are ever likely to cheat on the other whilst out drunk, or what have you. On the other hand, if one of us *did* cheat, it would probably be fairly serious / emotional - since neither of us are going to cheat just to have sex.
Ultimately, I just really fucking hope that it is never one of the trials of my marriage, because within the context of a relationship/marriage - dealing with a partner emotionally/sexually cheating on you can be one of the toughest things you may ever face.
But the really short answer is the older I've gotten, the more I've come to realise that you can work through just about anything, if you have the mind and heart to want to do so.