google/filament

get error 'error: declaration of ‘using TransparencyMode = enum class filament::TransparencyMode’ changes meaning of ‘TransparencyMode’ [-fpermissive]' when compile with gcc

zhoutotong opened this issue · 1 comments

in file: filament/include/filament/MaterialInstance.h:60

using TransparencyMode = TransparencyMode;

when compile with gcc, it report error:

filament/MaterialInstance.h:60:11: error: declaration of ‘using TransparencyMode = enum class filament::TransparencyMode’ changes meaning of ‘TransparencyMode’ [-fpermissive]
   60 |     using TransparencyMode = TransparencyMode;

It's fine with clang, I believe that to ensure portability and maintainability, it is important to always explicitly specify namespaces to avoid the permissive behavior of relying on compilers.

Just remove this line can fix this.

That's a GCC bug and it's annoying because our automatic formatting / cleaning tools will continue to unfix this.