Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum value evaluates to "true" #2036

Closed
Sainan opened this issue Nov 30, 2020 · 4 comments
Closed

Enum value evaluates to "true" #2036

Sainan opened this issue Nov 30, 2020 · 4 comments

Comments

@Sainan
Copy link

Sainan commented Nov 30, 2020

Assume an enum exists, for example, this:

enum myEnum : uint8_t
{
	ONE = 1,
	TWO,
	THREE
};

With this, fmt::to_string(TWO); returns "true" — I expected "2".

@Sainan Sainan changed the title Enum value evaluates to true Enum value evaluates to "true" Nov 30, 2020
@vitaut
Copy link
Contributor

vitaut commented Nov 30, 2020

Which library version?

@madscientist
Copy link

Did you mean enum class in your example?

@Sainan
Copy link
Author

Sainan commented Nov 30, 2020

7.1.3. I did not mean enum class.

@vitaut
Copy link
Contributor

vitaut commented Dec 3, 2020

Fixed in 33f9a6d. Thanks for reporting!

@vitaut vitaut closed this as completed Dec 3, 2020
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

No branches or pull requests

3 participants