On 2014-01-29 18:17, Martin Sandve Alnæs wrote:
Great. What I worry about however is linking with external libraries:

http://stackoverflow.com/questions/6494101/any-issues-with-mixing-libraries-with-and-without-std-c0x
[2]

We might be ok but I have no idea.


Is Trilinos the only C++ library that we link to? I don't think we interact with any 3rd party compiled libraries via STL objects. Maybe Boost.MPI (which we should remove anyway)?

Garth

Martin
On 2014-01-29 15:56, Anders Logg wrote:

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
[1]

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.

 Ok. I'll drop some small C++11 'testers' in the code and we can see
if they cause any issues for users of dolfin/master.

 Garth

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


Links:
------
[1] http://fenicsproject.org/pipermail/fenics/2014-January/000896.html
[2]
http://stackoverflow.com/questions/6494101/any-issues-with-mixing-libraries-with-and-without-std-c0x
[3] http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to