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

Improve exception safety with smart pointers #170

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

Improve exception safety with smart pointers #170

elfring opened this issue Nov 7, 2013 · 7 comments

Comments

@elfring
Copy link
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

@benkirk
Copy link
Member

benkirk commented Nov 7, 2013

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

@elfring
Copy link
Contributor Author

elfring commented Nov 8, 2013

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

@jwpeterson
Copy link
Member

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.

@jwpeterson
Copy link
Member

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

@jwpeterson
Copy link
Member

Test for unique_ptr added in 7f43d02

@jwpeterson
Copy link
Member

#335 #357

@jwpeterson
Copy link
Member

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.

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

No branches or pull requests

3 participants