21 Nor did Christ Our Lord wish only to condemn any form of polygamy or polyandry, as they are called, whether successive or simultaneous, and every other external dishonorable act, but, in order that the sacred bonds of marriage may be guarded absolutely inviolate, He forbade also even willful thoughts and desires of such like things: "But I say to you, that whosoever shall look on a woman to lust after her hath already committed adultery with her in his heart." Which words of Christ Our Lord cannot be annulled even by the consent of one of the partners of marriage for they express a law of God and of nature which no will of man can break or bend.
Source: Casti Connubii (Vatican.va)