I think between two men who are friends it's supposed to be a joke between the two of them and a compliment to you.
I've never heard it said to someone's face and/or in front of their partner though. That would be rude, and I'd feel uncomfortable being the one above and upset if I was the one 'punching'.
Even DH who comes across as brash at best, to downright rude at worst a lot of the time wouldn't say such a thing.
However - to say to a stranger that they had hooked up with someone out of their league, is REALLY rude and I would avoid that person from then on, most likely.
Edited by lynnemine, 06 December 2012 - 03:48 PM.