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

json.hpp 'isfinite' is not a member of 'std' also isinf; snprintf; stoull and to_string members of std #3263

Closed
Zombieanfuehrer opened this issue Jan 11, 2022 · 2 comments
Labels
state: needs more info the author of the issue needs to provide more details

Comments

@Zombieanfuehrer
Copy link

Hello,

on compile nlohmann/json 3.10.5 qnx 6.6 with GNU 4.8.3 -std=c++11.

got this messages:

Description Resource Path Location Type
'isfinite' is not a member of 'std' parser.hpp ../external/json/include/nlohmann/detail/input line 261 C/C++ Problem
Description Resource Path Location Type
'isinf' is not a member of 'std' binary_writer.hpp ../external/json/include/nlohmann/detail/output line 199 C/C++
Problem
Description Resource Path Location Type
'signbit' is not a member of 'std' to_chars.hpp ../external/json/include/nlohmann/detail/conversions line 1063 C/C++
Problem
Description Resource Path Location Type
'snprintf' is not a member of 'std' binary_reader.hpp ../external/json/include/nlohmann/detail/input line 322 C/C++
Problem
Description Resource Path Location Type
'std::to_string' has not been declared iteration_proxy.hpp ../external/json/include/nlohmann/detail/iterators line 20 C/
C++ Problem
Description Resource Path Location Type
'stoull' is not a member of 'std' json_pointer.hpp ../external/json/include/nlohmann/detail line 191 C/C++ Problem

@nlohmann
Copy link
Owner

This sounds like a broken STL - all standard headers for the mentioned functions are included. Can you please double check if you can compile a program like:

#include <string>

int main()
{
    std::string i = std::to_string(12);
}

or

#include <cmath>

int main()
{
    bool f = std::isfinite(100.0);
}

@nlohmann nlohmann added state: needs more info the author of the issue needs to provide more details and removed kind: bug labels Jan 11, 2022
@Zombieanfuehrer
Copy link
Author

This sounds like a broken STL - all standard headers for the mentioned functions are included. Can you please double check if you can compile a program like:

#include <string>

int main()
{
    std::string i = std::to_string(12);
}

or

#include <cmath>

int main()
{
    bool f = std::isfinite(100.0);
}

Ok sorry, i updated the GNU Compiler under qnx 6.6 SDK to 4.8.3 from 4.7.3 to use your lib.
Apparently I have scraped something, will try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs more info the author of the issue needs to provide more details
Projects
None yet
Development

No branches or pull requests

2 participants