https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82716
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Marc Mutz from comment #0) > Here's a stripped-down example: https://godbolt.org/g/sUZxAQ > Works with -stdlib=libc++: https://godbolt.org/g/bW4u1u But not if you use 'struct' instead of 'class': https://godbolt.org/z/kCb32t The only difference is which class-key causes a warning and which one doesn't.