C++ Logo

std-proposals

Advanced search

Re: User-defined conversion for strongly typed enums

From: Michał Policht <michal_at_[hidden]>
Date: Mon, 6 Apr 2020 14:23:37 +0200
> class X {
> public:
> struct ID {
> enum {
> NAME = 0x0,
> SIZE = 0x2,
> };
> };
>

An what's wrong with the above? I'd rather go in that direction and try
to unify all C++ constructs instead of introducing enum-specific syntax.

Regards,
Michał

Received on 2020-04-06 07:26:33