I was getting this error when compiling including windows.foundation.h:
error: ISO C++ forbids forward references to 'enum' types

Digging into this, I learned that forward declaring an enum is allowed
in C++11 but only if the underlying type (e.g. int) is declared. more:
https://stackoverflow.com/a/1280969

This seems to be a common-ish pattern [0] in mingw-w64; however I'm
not sure what caveats there are - maybe many of these aren't forward
declarations. However I know for the PropertyType enum; which was what
I was dealing with, adding the underlying type (int) did resolve the
issue. (It needs to be added to both the forward declaration and the
definition.)

[0] 
https://searchfox.org/mingw/search?q=typedef+enum+.%2B+.%2B%3B&path=&case=false&regexp=true

I'm hoping someone more familiar with the situation would be able to
dig in and determine what an appropriate fix would be...

-tom


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to