https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599
--- Comment #23 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #22) > Here we go, this still fails on trunk, just by making the data member > private: That's because for a non-dependent conversion to a class type we only check it before constraints if it's an aggregate class (otherwise it might have a constructor template, which means the conversion might instantiate things making it unsafe to check before constraints). Maybe we should consider refining the heuristic further. I believe the code is strictly speaking invalid though.