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

Revert C11 compilation requirement #412

Closed
wants to merge 1 commit into from

Conversation

dagostinelli
Copy link

No description provided.

@chapterjason
Copy link

+1

@richardeigenmann
Copy link

Using nullptr on line 216 of b2Body.cpp appears to be C++11 which will not compile on older standards.

Whilst it is important for a library to remain usable in older applications time does move on and eventually upgrades should be made by all to the latest current standard. Teams with a valid reason to stay behind can continue to use the old versions of the library.

I would vote to add the following line to the main CMakeLists.txt and keep the nullptr:
set (CMAKE_CXX_STANDARD 11)

But if compatibility with C++ from 10 years ago is a huge issue let's just approve this pull request and leave it up to the users of the library if they want to use C++11 or not.

I found the views of Bjarne interesting that are quoted in this article: http://stackoverflow.com/questions/20509734/null-vs-nullptr-why-was-it-replaced

@louis-langholtz
Copy link

Please note that nullptr made it into other files also. See Box2D/Testbed/Framework/Main.cpp for another instance. This pull request only addresses the C++11 nullptr in Box2D/Box2D/Dynamics/b2Body.cpp however.

@erincatto
Copy link
Owner

I plan to use C++11 for other things, like override. If you cannot support C++11, I recommend making a fork.

@erincatto erincatto closed this May 7, 2017
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.

None yet

5 participants