-
Notifications
You must be signed in to change notification settings - Fork 2.7k
The macro name is the same as the std member #1591
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
Comments
I agree that's messed up to use a colliding name. We could just use some other name.
But why would you be including a .cpp file? |
We assume C++11 elsewhere so all pre-11 #ifdef branches are dead code at this point. Fixes issue #1591 because we can just use std::isfinite.
We already assume C++11 elsewhere, so all pre-11 `#ifdef` branches are dead code at this point. Fixes issue #1591 because we can just use `std::isfinite` etc. assume C++11 in json_reader.cpp as well apply clang-format
I followed the guidelines of Amalgamated- (Possibly-outdated) to import |
I think you misunderstood the guidelines. You add these to your project. |
As below? cl src/mySrc.cpp jsoncpp-1.9.5/dist/jsoncpp.cpp /I jsoncpp-1.9.5/dist
g++ src/mySrc.cpp jsoncpp-1.9.5/dist/jsoncpp.cpp -I jsoncpp-1.9.5/dist |
i don't think so. That's not a Makefile. |
I know, it is just for debugging at development time, when you haven't added a task to the new source file. if(WIN32)
set(CMAKE_CXX_COMPILER "MSVC")
set(MIN_SDK_VERSION "10.0.19041")
set(MIN_MSVC_VERSION "1920")
elseif(UNIX)
set(CMAKE_CXX_COMPILER "g++")
endif() |
i don't know those details. sorry. But yeah if all you have is a shell script with one g++ command line then just add the amalgamated jsoncpp.cpp to that. But we're outside of jsoncpp issues here. |
Thanks for your patience. |
* Assume C++11 We already assume C++11 elsewhere, so all pre-11 `#ifdef` branches are dead code at this point. Fixes issue #1591 because we can just use `std::isfinite` etc. assume C++11 in json_reader.cpp as well apply clang-format * valueToString: simplify lookup of special float name
Describe the bug
The macro name
isfinite
is the same asstd::isfinite
, which can cause compiler to incorrectly replacestd::isfinite
tostd::_finite
.To Reproduce
Just use
std::isfinite
after the inclusion ofjsoncpp.cpp
.Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context
Please use
std::isfinite
to check values, or use_isfinite
directly or use other macro name to circumvent std member names.The text was updated successfully, but these errors were encountered: