-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Replace auto_ptr with scoped_ptr #2037
Replace auto_ptr with scoped_ptr #2037
Conversation
C++11 deprecated auto_ptr and c++17 removes it.
NOTE: Locally, I have some issues with the unit tests, which I suspect are due to my setup...
|
Ignore my comment above. Instead of waiting for Travis, I checked out master and compiled and ran the tests... and had the same result.
So they are failing due to something else in my Setup. |
Closing this, not only because clang failed in Travis, directly due to this change... But because after reading the discussion in #2035 I now see that PCL supports old compilers which don't have C++11 |
I can not reproduce the Travis error with clang locally... but it's obviously because of the lack of C++11.
|
Some of the tests are known to fail in environments different from what we have on Travis. Often the problems are related to fp precision. Regarding this PR, perhaps you can replace |
👍 yep I can use a Boost alternative. |
The previous commit, replaced the removed auto_ptr with C++11 unique_ptr. PCL supports older C++ versions, so Boost.Move unique_ptr is needed.
@taketwo I didn't squash my commit yet, I don't have the older version of clang to test against, so I reopened the PR to use Travis. |
👎 boost/move/unique_ptr was added with Boost 1.57 and you're testing with 1.55, and your I'll close this again. Do you have a label or big issue for tracking large breaking changes? |
Sorry for the delay, was on vacation. The "traditional" Boost alternative for Regarding a label breaking changes, we don't have one, but it's a good idea to have. What do you think @SergioRAgostinho? |
For visually identifying the PRs? Sure. |
Also will be helpful when putting together the changelist. |
I’m away, I will be able to send another PR next week. |
In file included from /home/rakshith/pcl/visualization/tools/image_grabber_saver.cpp:43:0: I'm getting a lot of this type of warnings during build process. What kind of problems can it cause? I noticed this while re building because I was having segmentation faults for certain programs, and now I'm wondering if it could be because of this. |
|
Actually it's already removed from C++17 |
auto_ptr is removed with C++17. C++11 std::unique_ptr and boost::move::unique_ptr are not old enough for all platforms supported by PCL.
Sorry I forgot about this and could have just fixed it from the GitHub web interface (which is what I just did)... I will squash the commits if Travis passes. |
We can do the squasht for you, no worries. |
The job exceeded the maximum time limit for jobs, and has been terminated. :( |
C++11 deprecated auto_ptr and c++17 removes it.
It looks like this is just a straight forward replacement... it's being used in the pimpl pattern.