https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90243
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Up to GCC 7.2 there's an error for the example, with notes. The error was fixed by r251429 for PR 80935 (and with r252943 on gcc-7-branch) so from 7.3 the error isn't given, but the notes remain.