Skip to content

Compilation error with GCC 16.1.1 due to SFINAE warning. #9004

Description

@jparsert

There seems to have been an update to the warnings emitted by GCC in version 16.1.1 (not an issue with my previous GCC 15.2.1). In particular, the warning/error -Werror=sfinae-incomplete seems to be an issue.

I get compilation errors in namespace.h.

....
error: defining ‘namespacet’, which previously failed to be complete in a SFINAE context [-Werror=sfinae-incomplete=]
  line 92 | class namespacet:public namespace_baset
....

Limited googling has shown that other software projects are experiencing the same issue with the new behavior in GCC. There seem to a couple of possible (fairly simple) fixes, but I am not sure which is preferred.

On a similar note, I am also getting a compilation error for -Werror=unused-but-set-variable since GCC 16.1.1. Issue is self-explanatory, I guess.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions