
On 21/12/05, Martin <adrianm@touchdown.se> wrote:
Some more suggestions: - The normal separator in a stream is characters where isspace returns true, not "|".
The problem I see with that is the "MIDDLE|LEFT" should be read as a single enum, while "MIDDLE LEFT" should be read as 2. Using the usual fill character for the separator would make it impossible to have more than one BITFIELD-style enum on one line and prevent operator>> from being able to properly read a BITFIELD-style enum without straying from the usual operation of operator>>. And using the "one line with all the values of the enum" is just using ' ' and '\n' as the separators instead of '|' and ' '. Also, '|' matches the in-code usage of enums -- "MIDDLE|LEFT", once read, has the value MIDDLE|LEFT. - Scott