Skip to content

Wise enum extension #22

@koczwak

Description

@koczwak

For our internal use, we extended wise-enum, adding:

  • from_number function (creation of enum similiar to from_string)
  • ostream operator
    WISE_ENUM(Foo, (Bar, 1)) Foo::Bar -> "Bar(1)"
  • abort call in case of calling from_number/from_string with invalid argument

Do you want any of those features pulled into your project? We can hide them behind defines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions