[GSoC] Header Generation for C/C++

Manu turkeyman at gmail.com
Wed Jul 17 21:00:19 UTC 2019


On Wed, Jul 17, 2019 at 11:45 AM Eduard Staniloiu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Wednesday, 17 July 2019 at 17:43:21 UTC, Manu wrote:
> > On Wed, Jul 17, 2019 at 6:40 AM Eduard Staniloiu via
> > Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> >>
> >> I want to give a heads-up to everyone for the following issue
> >> (this had me scratching my head for a couple of days unit I
> >> caught it):
> >>
> >> The current code doesn't take into account `enum BaseType`s,
> >> ex:
> >> ```
> >> enum TOK : ubyte { /* ... */ }
> >>
> >> class Expression
> >> {
> >>    TOK op;
> >>    /* ... */
> >> }
> >> ```
> >>
> >> The `enum TOK` above gets generated as
> >> ```
> >> enum TOK { /* ... */ }
> >> ```
> >
> > So... use:
> >
> > enum class TOK : unsigned char { /* */ };
> >
> > ??
>
> That’s what I would like to use, but `enum class`es are starting
> with C++11
>
> This will also lead to breaking code as the fields must now be
> accessed as `TOK::field`.
>
> That being said, I think C++11 would be nice

Breaking what? This feature doesn't exist yet! There's nobody with
code written against these generated headers...



More information about the Digitalmars-d mailing list