On 13.08.2008, at 15:13, Roman Kantor wrote: > matthiasm wrote: > >> >> >>> inline Fl_Align operator|(Fl_Align lhs, Fl_Align rhs) { >>> return static_cast<Fl_Align>(lhs|rhs); >>> } > > I like that, but your global operator seems to be recursive! > > maybe > > inline Fl_Align operator|(Fl_Align lhs, Fl_Align rhs) { > return > static_cast<Fl_Align>(static_cast<int>(lhs)|static_cast<int>(rhs)); > }
Um, yes, what you said. As an addition to previous arguments: I know that type safety does not ensure that a program runs well, and of course there is always someone who casts it away. But currently, the function "align(uchar a)" needs an explanation. "align(Fl_Align a)" is much clearer, and if then in the documentations, "Fl_Align" is an (automatic) hot link to the enum, life *will* be easier. Oh, and the same is true for Fl_Font, Fl_Boxtype, Fl_When, etc., Fl_Event being the exception. ---- http://robowerk.com/ _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev