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

refactor: use nullptr #660

Closed
wants to merge 3 commits into from
Closed

Conversation

e-kwsm
Copy link
Contributor

@e-kwsm e-kwsm commented Jan 25, 2025

pugixml/CMakeLists.txt

Lines 71 to 79 in 9d7fcbf

# Set the default C++ standard to C++17 if not set; CMake will automatically downgrade this if the compiler does not support it
# When CMAKE_CXX_STANDARD_REQUIRED is set, we fall back to C++11 to avoid breaking older compilers
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED AND NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMAKE_VERSION VERSION_LESS 3.8)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
elseif (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()

C++11 or later is necessary, so nullptr must be available.

@e-kwsm e-kwsm force-pushed the modernize-use-nullptr branch from 65e672d to 2a64326 Compare January 25, 2025 02:04
@e-kwsm e-kwsm force-pushed the modernize-use-nullptr branch from 2a64326 to cc64f35 Compare January 25, 2025 02:17
@zeux zeux closed this Jan 25, 2025
@e-kwsm
Copy link
Contributor Author

e-kwsm commented Jan 26, 2025

Thank you for your review. I understand your point.
But 0/NULL, instead of PUGIXML_NULL, are used for nullptr, which is fixed in d74511c.

Would you reopen this? I will revert the other commits.

@zeux
Copy link
Owner

zeux commented Jan 26, 2025

But 0/NULL, instead of PUGIXML_NULL, are used for nullptr, which is fixed in d74511c.

This is by design, you can refer to other PRs around NULL replacements. I'm not interested in further changes in this area.

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

Successfully merging this pull request may close these issues.

2 participants