Uint for flags?

• Jan 11, 2013 - 17:06


I'm looking at the "layer" idea that's currently got into 2.0 and I wonder if there's a specific reason that uints are used to hold flags?

I can see the QFlags class in Qt does it that way, but the bitset class (for a selectable but fixed number of flags) or the vector::bool class (for selectable and dynamically variable number of flags) seem to be better implementations, at least compared to the normal "uint and bit operation" implementation.

Is there a good reason I shouldn't base a "layers" implementation on one of these classes?



The use of "layers" is currently under debate, so I wouldn't do too much on that score at present.

Would you be interested in helping with the coding for a revamped instruments list for the Create Score dialogue?

I am currently working on the data structure and list of instruments, but sadly my programming skills lie in the past (BBC BASIC V, Pascal and Delphi) so I am looking for a C++ coder to help with this before I submit an official feature request.

You can see where we have got to with discussions here:


It seems that the vector::bool construct is on the "likely to be deprecated" list, so that's not a good choice. bitset isn't too bad, I s'pose.

Do you still have an unanswered question? Please log in first to post your question.