libantioch / antioch

C++ Chemical Kinetics, Thermodynaimics, and Transport Library
https://libantioch.github.io/
Other
23 stars 17 forks source link

Add shared_ptr dependency to Antioch? #45

Open roystgnr opened 10 years ago

roystgnr commented 10 years ago

As per the discussion in https://github.com/libantioch/antioch/pull/44 we would like to introduce Antioch::shared_ptr to clarify memory management of certain Antioch classes. This would be a shim around std::shared_ptr falling back on boost::shared_ptr or tr1::shared_ptr if necessary. If anyone objects to Antioch requiring C++11-or-Boost, speak up now.

GuillaumeReinisch commented 10 years ago

I think that's a great idea. May be it would be a good idea to let the user the choice between boost or c++11 or tr1, even if C++11 is available. For instance boost is able to expose boost::shared_ptr to python extremely well; and that can attract some people (may be other parts of boost take advantages of boost::smart pointers). Personally I'm very happy with either C++11/Boost/tr1.

roystgnr commented 10 years ago

It looks like what we want to do is themis' comment to the answer on this question: https://stackoverflow.com/questions/2937351/how-to-use-autoconf-with-c0x-features - just "using foo::shared_ptr;" inside namespace Antioch, with some ifdefs to decide foo. I can't seem to find an existing autoconf test for this one but it shouldn't be hard to cook up.

pbauman commented 10 years ago

That post is exactly what I had in mind - sorry for not digging it up sooner.

GuillaumeReinisch commented 10 years ago

very nice