Improve exception safety with smart pointers #170

Closed
elfring opened this Issue Nov 7, 2013 · 7 comments

Comments

Projects
None yet
3 participants
Contributor

elfring commented Nov 7, 2013

Would you like to wrap any pointer data members with the template class "std::unique_ptr"?

Update candidate: DofMap

Owner

benkirk commented Nov 7, 2013

Perhaps when we are willing to require C++11, which is will not be for a while yet, unfortunately.

Contributor

elfring commented Nov 8, 2013

How do you think about to reuse the approach by Howard E. Hinnant in the meantime?

Owner

jwpeterson commented Nov 13, 2013

How do you think about to reuse the approach by Howard E. Hinnant in the meantime?

From the link: "unique_ptr.hpp requires a boost header installation, but does not require a compiled boost source."

We do provide a minimal boost installation in contrib which is available by default... this class seems like it would be a nice bridge between the current use of AutoPtr in the library and the capabilities that will be provided by C++11. So I think it would be a nice feature, but I don't really have time to implement it personally.

Owner

jwpeterson commented Jul 2, 2014

I'll add a configure test for std::unique_ptr in the meantime...

Owner

jwpeterson commented Jul 3, 2014

Test for unique_ptr added in 7f43d02

Owner

jwpeterson commented Mar 25, 2015

As of #357, you can configure libmesh with --enable-unique-ptr and libmesh will use a non-deprecated smart pointer type appropriate to your compiler.

jwpeterson closed this Mar 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment