On 19 April 2017 at 09:37, Murray Cumming <murr...@murrayc.com> wrote:
> However, some of the C enums that we wrap are actually meant to be > integer constants, so it seems that we cannot and should not use "enum > class" for these. So I wonder what is the most "modern C++" way to do > this while keeping the new-style syntax. Here are two possibilities: > > 1. Use old-style enums inside a class: > 2. Use constexpr int constants inside a class: > FWIW, I try to avoid using classes where I don't actually need them (though of course all bets are off where templates come into play), so I would also suggest putting such constants in a namespace, instead of a class. I'm not sure how popular that viewpoint is, but fwiw, a quick search did find some other people on Stack Overflow favouring it.
_______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list