Closed jasonimercer closed 5 years ago
Looks like some tests are timing out. Could someone re-kick them or verify the test environment is correct? These tests are also failing in other PRs.
thanks @jasonimercer for the improvement!
Test failure is unrelated, retriggering CI now that the test failure has been fixed on master @ros-pull-request-builder retest this please
Just to confirm, this change does change ABI isn't it ?
This would not result in an ABI change. If someone is creating a dynamic reconfigure message and then they are trying to inherit from it and they are on C+11 or better then this will result in a compilation error. This use-case is pretty specific though and I struggle to imagine what the intention would be. Generally if you want some custom data in a dynamic reconfigure you'll end up writing a new one rather than trying to re-use some fields.
If the user wanted to re-use some fields then the language offers options such as templated functions.
I've been using this branch at Clearpath for about 1/2 a year now without issue. It's nice to be able to crank up warnings an not get spammed by issues from upstream.
I'd be happy to add to this commit and add some comments around the final keyword and where it's used in the source. If someone ever encounters an issue with it we can help them understand where they may have gone astray and offer some options inline.
This use-case is pretty specific though and I struggle to imagine what the intention would be.
Yeah I agree that I haven't seen that use case around.
It's nice to be able to crank up warnings an not get spammed by issues from upstream.
:+1:
I'd be happy to add to this commit and add some comments around the final keyword and where it's used in the source.
That would be great for posterity.
The code change looks good to me.
It looks like now all platforms even windows report the correct value for __cplusplus
so no need to add platform specific logic around it.
The checks for __cplusplus
are there so that we don't break this package for people stuck using a compiler before C++11 (final keyword added in 11). If we are happy saying dynamic_reconfigure is only C++11 or better then I can remove the checks.
I'll add a commit to the PR now with the inline comments on why there's a final keyword.
If we are happy saying dynamic_reconfigure is only C++11 or better then I can remove the checks.
As currently this branch is being used for all ROS distros we will need to keep the checks for now.
I'll add a commit to the PR now with the inline comments on why there's a final keyword.
https://github.com/ros/dynamic_reconfigure/pull/113/commits/e2a2b348ec4c7ab747788ac68acde30e1132af96 lgtm, thanks!
Add final keyword to child class since parent has virtual methods and grand parent doesn't have a virtual destructor (it's based on a .msg file). This allows the code to be compiled without warnings by pedantic compilers like clang 6.0 and above.
Has no impact on pre-C++11 compilers.
A minimal program to help understand this issue is as follows:
compiling this with clang-6.0 gives: