https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102804
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|template matching fails w/ |template matching fails w/ |false ambiguity on ternary |false ambiguity on ternary |expressions with enums |expressions with enums | |class defined with unsigned | |int32_t --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm: <source>:4:9: error: 'unsigned' specified with 'int32_t' {aka 'int'} [-Wpedantic] 4 | enum: unsigned int32_t { FOO, BAR } foobar = FOO; | ^~~~~~~~ Looks like this is the cause of the problem, Changing it to unsigned or uint32_t and the error goes away ...