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

The macro name is the same as the std member #1591

Open
XY-ShadowK opened this issue Dec 29, 2024 · 0 comments
Open

The macro name is the same as the std member #1591

XY-ShadowK opened this issue Dec 29, 2024 · 0 comments

Comments

@XY-ShadowK
Copy link

Describe the bug

#if !defined(isfinite)
#include <float.h>
#define isfinite _finite
#endif

The macro name isfinite is the same as std::isfinite, which can cause compiler to incorrectly replace std::isfinite to std::_finite.

To Reproduce
Just use std::isfinite after the inclusion of jsoncpp.cpp.

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Windows 10 22H2 x64

Additional context
Please use std::isfinite to check values, or use _isfinite directly or use other macro name to circumvent std member names.

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

1 participant