Transfers between spouses or incident to divorce
In the case of a transfer of a residence to which section 1041(a) applies—
(i)#
paragraph (2) shall not apply to such transfer, and
(ii)#
in the case of taxable years ending after such transfer, paragraphs (1) and (2) shall apply to the transferee in the same manner as if such transferee were the transferor (and shall not apply to the transferor).