https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77802
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- 17.6.4.8 [res.on.functions] p2 In particular, the effects are undefined in the following cases: ... — if an incomplete type (3.9) is used as a template argument when instantiating a template component, unless specifically allowed for that component.