PVL: Parameter Value Language
Mode set selector. More...
|bool||operator!= (const Which_Mode &which) const|
|bool||operator== (const Which_Mode &which) const|
Mode set selector.
The Which_Mode class is provided to avoid type ambiguity if the arguments to the syntax methods where:
method (bool, bool = default)
is confused with
method (bool = default)
It is not sufficient to make the defaulted argument some other primitive type (e.g. an enum) since default conversions will still result in ambiguity.
The solution is this trivial class (struct) which contains a state data member and two methods for the == and != operators. Now the defaulted argument is typed to this class and no ambiguity occurs.
|bool operator!=||(||const Which_Mode &||which||)|| const