I've seen it in coding conventions at previous/current job(s), but I can't seem to find a reason online for why this would be the preferred way of writing an enum:
enum class Mode
{
Mode1,
Mode2,
Mode3,
Mode4,
Nil = -1
};
What (if any) is the benefit of adding the Nil = -1
line?
Aucun commentaire:
Enregistrer un commentaire