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

node.hpp(1351): Error C4800 : Implicit conversion from 'int' to bool. Possible information loss #429

Closed
2 tasks
tomwpid opened this issue Nov 17, 2024 · 5 comments

Comments

@tomwpid
Copy link

tomwpid commented Nov 17, 2024

Description

The following warning is generated when compiling with the node.hpp header included.

Reproduction steps

Include node.hpp without the warning C4800 disabled.

Expected vs. actual results

Expected: No warning should be generated.
Actual: Warning C4800 is generated.

Minimal code example

default:
            // alphabets and numbers are also allowed.
            return std::isalnum(c);
        }

Error messages

node.hpp(1351): Error C4800 : Implicit conversion from 'int' to bool. Possible information loss

Compiler and operating system

Compiler: MSVC v143 - v14.38 - 17.8 OS: Windows

Library version

0.3.14

Validation

@fktn-k
Copy link
Owner

fktn-k commented Nov 18, 2024

@tomwpid
Thanks for filing this issue.
The warning C4800 is not enabled with the compile option /W4 and I didn't know the warning is raised.
I could reproduce the warning by passing the compile option /w44800 in when building the test suite.
I'll resolve the warning soon (I'm working on it), but I'm not planning to pass the compile /Wall since it enables so many warnings which I wouldn't like to take care of...

@tomwpid
Copy link
Author

tomwpid commented Nov 18, 2024

OK - thank you!

@fktn-k
Copy link
Owner

fktn-k commented Nov 19, 2024

@tomwpid
The C4800 warning should be resolved by the PR #430.
Could you confirm the fix with the develop HEAD?

@tomwpid
Copy link
Author

tomwpid commented Nov 19, 2024

@fktn-k - Confirmed, PR #430 has fixed it.

@fktn-k
Copy link
Owner

fktn-k commented Nov 20, 2024

@tomwpid
Thanks! I'll close this issue then.
Feel free to reopen it if you find anything related but unresolved.

@fktn-k fktn-k closed this as completed Nov 20, 2024
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

2 participants