What do you mean? I've clearly stated I want compile time execution, not runtime execution of this macro. Are you thinking of the _Static_assert function? It is executed at compile time, I think it's a feature built into the gcc compiler.
I have never learn C, just c++ ... and this code where I am working on is written for Linux, and for other compilers than VS. That is why I got tones of errors, one of them I don't know how to handle them without broke the functionality (I cannot try what I modify, so I am working blind).
I suspect the issue is that enums are usually used to signify single values, i.e the flags field is either FILE_READONLY or FILE_SYSTEM, but not both. If you need to combine values then you should really use a set of #define statements.
Thank you Richard, that error has vanished, but I cannot try this code yet ... why do you say that this solution is not really correct ? The safe solution would be to overload |= operator, but I cannot do that into enum, right ?
Last Visit: 31-Dec-99 18:00 Last Update: 10-May-21 9:51