Fwd: enums that are really just sets of constants




On 23 May 2017 at 15:12, Kjell Ahlstedt <kjellahlstedt gmail com> wrote:

I don't understand how you can have, for instance
  void f(ResponseType r);
if ResponseType is an uninstantiable class. If ResponseType is the name of a class, and you want to treat it as if it were the name an enum, wouldn't it require something like

D'oh. Right! Carry on. :)

The language seems to make this overcomplicated. I need to search for info on whether anyone ever proposed a scoped but implicitly convertible enum, and if so, why it never got anywhere.
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]