Provincial law sets the minimum age, within their competence, over solemnization. For the most part, provinces set it at 16 with parental consent, or 15 in the Northwest Territories or Nunavut. In a situation where someone below that age wishes to marry, three jurisdictions disallow that: Quebec, Yukon, and Newfoundland and Labrador. In the other jurisdictions it's only allowed where it's either approved in advance by a court, or in three jurisdictions where the minister responsible for the solemnization of marriage provides written permission to that effect.
So Bill C-22 will not prevent somebody who meets the criteria under provincial legislation from marrying a person who is within the close-in-age exception. If a court is being asked to approve the marriage of a young person, the exceptional circumstance provided in the provincial legislation is generally because it's expedient and in the interest of the young person—she's pregnant, those types of issues. The court would be cognizant of what the criminal law says. If this were a sexual assault under the criminal law, the court would make a determination whether it was expedient or in the interest of the young person to authorize a marriage in those circumstances.