idaeim studio
 PVL: Parameter Value Language

Public Member Functions | Public Attributes
Lister::Which_Mode Struct Reference

Mode set selector. More...

#include <Lister.hh>

List of all members.

Public Member Functions

bool operator!= (const Which_Mode &which) const
bool operator== (const Which_Mode &which) const

Public Attributes

char state

Detailed Description

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.

Member Function Documentation

bool operator== ( const Which_Mode which) const [inline]
bool operator!= ( const Which_Mode which) const [inline]

Member Data Documentation

char state

The documentation for this struct was generated from the following file: