On Wed, Jan 29, 2014 at 03:31:10PM +0000, Garth N. Wells wrote:
> A long thread has been mulling over the build system consequences of
> merging FFC and UFC into one 'package':
>
>     http://fenicsproject.org/pipermail/fenics/2014-January/000896.html
>
> The crux of it is the different build systems used by FFC (Python
> distutils) and UFC (CMake). UFC uses CMake because of the dependency
> on boost::shared_ptr.
>
> If we were to switch to std::shared_ptr, using distutils for both
> FFC and UFC should be straightforward. However, std::shared_ptr is
> part of the C++11 standard and would require a compiler that
> supports at least the std::shared_ptr part of the standard.
>
> The question therefore is should we switch from boost::shared_ptr to
> std::shared_ptr in DOLFIN? To start things off:
>
> * Pros:
>
>  - Makes FFC and UFC packaging simple
>  - Use system provided STL (shared_ptr, unordered_set,
> unordered_set, etc)
>  - We can start using other useful C++ features from the new
> standard, e.g. auto:
>
>   for (std::vector<<<..............> > >::const_iterator itr =
> myvec.cbegin(); itr != myvec.cend(); ++itr)
>
> becomes
>
>   for (auto itr = myvec.cbegin(); itr != myvec.cend(); ++itr)
>
>
> * Cons
>
>   - Lack of C++11 support in old compilers. This is unlikely to be a
> problem on desktops. Any issues are most likely to be on older
> clusters. It does appear that std::shared_ptr has been available for
> major compilers (GCC/Clang/Intel/IBM/Microsoft) for quite some
> years.

I support switching to std::shared_ptr and look forward to using
auto.

--
Anders
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to