[GSoC] Header Generation for C/C++

Eduard Staniloiu edi33416 at gmail.com
Wed Jul 17 18:43:05 UTC 2019


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


More information about the Digitalmars-d mailing list