three conditions arise out of above scenario
1.if man has s*x with an unmarried woman : no punishment , only he gets reward.
2.if this man has s*x with a married woman and wife of man objects: still no punishment, only he gets reward
3.if this man has s*x with a married woman and her husband objects and proves it beyond doubt: man gets punishment for adultery
in nutshell only husband of a married woman can get a man(whether married or unmarried) punished under ipc.
wife has no such right if her husband commits adultry.