Skip to content

Feature: Check if a given value equals one of the enums #43

Closed
@peter-moran

Description

@peter-moran

I would like check if a value I have is equivalent to one of my enums.

For example, assume a function contains, I would expect it to behave as:

WISE_ENUM(Color, (GREEN, 2), RED);

static_assert(wise_enum::contains<Color>(1) == false);
static_assert(wise_enum::contains<Color>(2) == true);
static_assert(wise_enum::contains<Color>(3) == true);

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