gcc ignores the c++17 standard advisory in some versions and simply doesn't warn about unused private variables. Clang and MSVC do warn about unused private variables and do follow the standard