Hello,

I welcome the change to enum classes. I have made this transition recently in 
my project and want to share my experience:

A conversion to bool from enum class is possible via
  bool operator!(ResponseType i) { return (i != ResponesType::NONE); }
  ResponseType i = f();
  if (!i) ;
  if (!!i) ; // it is not possible to use 'if (i)'

A comparison is also possible:
  bool operator<(BuiltinIconSize lhs, BuiltinIconSize rhs);

For numbers, which are |ed (like CalendarDisplayOptions) your second suggestion 
looks promising. But it will be a hack to get
  void Calendar::set_display_options(Calendar::DisplayOptions flags);
to accept
  calendar.set_display_options(Calendar::DisplayOptions::SHOW_HEADING | 
Calendar::DisplayOptions::SHOW_DAY_NAMES); 

And it would be good to further disallow
  Calendar::DisplayOptions::SHOW_HEADING | UIManager::ItemType::POPUP


Diether

Attachment: pgpE5lnw1EyzH.pgp
Description: Digitale Signatur von OpenPGP

_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to