https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642
--- Comment #10 from Barry Revzin <barry.revzin at gmail dot com> --- Check out the report I opened for an example where the #pragma around the whole class isn't really enough anyway - since you might want to disable the warning for specializations of class/function templates.