https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107525 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Also, the constraint is wrong for the non-const conversion. It checks for convertibility to const element_type* but should be element_type*.