Yes, there is a notable exception. Adultery remains a punishable offense for military personnel under the Army Act. In the armed forces, it's viewed as "stealing the affections of a brother officer's wife" and can lead to dismissal or imprisonment. The Supreme Court has clarified that the 2018 judgment decriminalizing adultery applies only to civilians.