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

Use default C++ and boost::placeholders::_N instead of deprecated _N #350

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lucasw
Copy link

@lucasw lucasw commented May 24, 2022

The default C++ will be 14 in noetic Ubuntu 20.04, 17 or later on newer systems- 17 is necessary to avoid issues with log4cxx 0.12.

OgreVector3.h is deprecated in newer Ogre versions, a helper file is present in the latest rviz ros-visualization/rviz#1741 (so none of this can be released until rviz with that new header file is released)- I can separate this out into a different commit/PR if desired.

My text editor added newlines to last lines of the files I edit, I can remove those if desired.

@maximilianwulf
Copy link
Collaborator

Thank you, should be fine. Processing it with the team.

@@ -192,9 +192,11 @@ class FrameManager : public QObject
template <class M>
void registerFilterForTransformStatusCheck(tf2_ros::MessageFilter<M>* filter, Display* display)
{
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this, _1, display));
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With c++14 it is recommended to use lambdas, not?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a smaller change for right now, would prefer to get this in and look into other options later, and I think still is backwards compatible back to c++11 if that is a concern for any other users (but possibly lambdas are too? Would have to look into it).

@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_cv)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set(CMAKE_CXX_STANDARD 17)

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is that I assume every system this is building on now is >= 11 so on Ubuntu 20.04 the default will be 14, and on 22.04 it will be 17, there's no reason to hold it back at 11.

…placeholders::_1 instead of _1, and use new ogre_vector.h to handle deprecation of OgreVector3.h
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

2 participants