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

_finite and _isnan are no members of "std" #808

Closed
SimonNitzsche opened this issue Oct 28, 2017 · 11 comments
Closed

_finite and _isnan are no members of "std" #808

SimonNitzsche opened this issue Oct 28, 2017 · 11 comments
Labels

Comments

@SimonNitzsche
Copy link

image

@SimonNitzsche
Copy link
Author

those are defined, but not in the std namespace.

@nlohmann nlohmann added the platform: visual studio related to MSVC label Oct 28, 2017
@nlohmann
Copy link
Owner

MSVC tests succeed with MSVC 2015 and 2017y which version are you using?

@SimonNitzsche
Copy link
Author

I am using MS Visual Studio Community 2017 with the newest update and WindowsSDK 10.0.15063.0

It does work tho when i remove the namespace

@nlohmann
Copy link
Owner

Do you compile the test suite or some custom code?

@nlohmann
Copy link
Owner

Strangely, the error message mentions _finite and _isnan which are both not in the highlighted line.

@gregmarr
Copy link
Contributor

I would check your include files for something like

#define isfinite(x) _finite(x)
#define isnan(x) _isnan(x)

@SimonNitzsche
Copy link
Author

it is defined. but not in the std namespace. It works when i remove the std namespace in those lines. Also on of our other devs do have the issue aswell, while an other one doesn't.

@gregmarr
Copy link
Contributor

If you have those defines, then the code that calls std::isfinite is being changed to instead call the non-existent function std::_finite, which is why you're getting the error.

@SimonNitzsche
Copy link
Author

std::isfinite is NOT defined
isfinite is defined

@gregmarr
Copy link
Contributor

gregmarr commented Oct 30, 2017

The preprocessor doesn't care about the std:: part. That's why the error message is std::_finite is not defined and not std::isfinite is not defined.

@nlohmann
Copy link
Owner

This seems not to be an issue of the library.

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

No branches or pull requests

3 participants