https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97814
--- Comment #1 from Colby Parsons <caparson at uwaterloo dot ca> --- It is worth mentioning that the error does appear if I delete the move assignment operator too. i.e. add "S & operator=(S &&) = delete;" to struct S. I have no idea why this would make the error appear though.