Skip to content

idlc: class reserved C++ keyword #14

Description

@Davide-1998

When running the zerodds-idlc binary with cpp backend, if the input IDL file contains the keyword class as member of a struct, the compiler raise the error zerodds-idlc: cpp codegen failed: invalid identifier 'class': reserved C++ keyword.

For example, with a file named character.idl:

enum CharacterClass {
    WARRIOR,
    MAGE,
    ARCHER
};

struct Character {
    int8 health;
    CharacterClass class; // Here 'class' member as reserved C++ keyword
};

Running with:

zerodds-idlc generate ./character.idl --cpp --output ./

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions