Skip to content

Conversation

Auliyaa
Copy link

@Auliyaa Auliyaa commented Jan 13, 2025

This change allows for comparison between an ::_enumerated type and the Enum type:

BETTER_ENUM(Foo, int, value_a, value_b)

int main()
{
  Foo::_enumerated f1 = Foo::value_a;
  Foo f2 = Foo::value_b;

  if (f1 == f2)
  {
    std::cout << "equal" << std::endl;
  }
  else
  {
    std::cout << "not equal" << std::endl;
  }

  return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant