Hello,
I am getting ambiguity errors when compiling our code that includes both
boost 1.62.0 and libmesh 1.0.0. One of the errors looks like this (there
was also a problem with overloaded function"forward"):
/home/bozidarnovakovic/NEMO5/libs/libmesh/libmesh/include/libmesh/unique_ptr.hpp:211:48:
error: call of overloaded ‘move(libMesh::Parallel::Request*&)’ is ambiguous
: t2_(boost::move(t2)), t1_(boost::move(t1)) {}
~~~~~~~~~~~^~~~
In file included from /usr/include/boost_1_62_0/boost/move/utility.hpp:29:0,
from
/usr/include/boost_1_62_0/boost/optional/optional.hpp:46,
from /usr/include/boost_1_62_0/boost/optional.hpp:15,
from
/usr/include/boost_1_62_0/boost/spirit/home/classic/core/match.hpp:15,
from
/usr/include/boost_1_62_0/boost/spirit/home/classic/core.hpp:28,
from
/usr/include/boost_1_62_0/boost/spirit/home/classic.hpp:24,
from
/usr/include/boost_1_62_0/boost/spirit/include/classic.hpp:11,
from
/home/bozidarnovakovic/NEMO5/prototype/include/io/DatabaseParser.h:26,
from
/home/bozidarnovakovic/NEMO5/prototype/include/simulations/Dummy/Dummy2.h:23,
from Dummy2.cpp:27:
/usr/include/boost_1_62_0/boost/move/utility_core.hpp:56:10: note:
candidate: typename boost::move_detail::enable_if_and<T&,
boost::enable_move_utility_emulation<T>,
boost::has_move_emulation_disabled<T> >::type boost::move(T&) [with T =
libMesh::Parallel::Request*; typename boost::move_detail::enable_if_and<T&,
boost::enable_move_utility_emulation<T>,
boost::has_move_emulation_disabled<T> >::type =
libMesh::Parallel::Request*&]
move(T& x) BOOST_NOEXCEPT
^~~~
In file included from
/home/bozidarnovakovic/NEMO5/libs/libmesh/libmesh/include/libmesh/auto_ptr.h:52:0,
from
/home/bozidarnovakovic/NEMO5/libs/libmesh/libmesh/include/libmesh/parallel.h:25,
from
/home/bozidarnovakovic/NEMO5/prototype/include/common/AtomisticFemBase.h:40,
from
/home/bozidarnovakovic/NEMO5/prototype/include/common/AtomisticDomain.h:25,
from
/home/bozidarnovakovic/NEMO5/prototype/include/common/PseudomorphicDomain.h:25,
from Dummy2.cpp:34:
/home/bozidarnovakovic/NEMO5/libs/libmesh/libmesh/include/libmesh/unique_ptr.hpp:96:1:
note: candidate: typename boost::enable_if_c<(!
boost::detail_unique_ptr::is_convertible<T, boost::detail_unique_ptr::rv<T>
>::value), T&>::type boost::move(T&) [with T = libMesh::Parallel::Request*;
typename boost::enable_if_c<(! boost::detail_unique_ptr::is_convertible<T,
boost::detail_unique_ptr::rv<T> >::value), T&>::type =
libMesh::Parallel::Request*&]
move(T& t)
^~~~
/home/bozidarnovakovic/NEMO5/libs/libmesh/libmesh/include/libmesh/unique_ptr.hpp:108:1:
note: candidate: typename boost::enable_if_c<(!
boost::detail_unique_ptr::is_convertible<T, boost::detail_unique_ptr::rv<T>
>::value), const T&>::type boost::move(const T&) [with T =
libMesh::Parallel::Request*; typename boost::enable_if_c<(!
boost::detail_unique_ptr::is_convertible<T, boost::detail_unique_ptr::rv<T>
>::value), const T&>::type = libMesh::Parallel::Request* const&]
move(const T& t)
^~~~
The problem can be resolved by reordering the header files such that those
that include libmesh are called before those that include boost. However,
this is not practical since there are many such places to change and there
is no guarantee the problem will not reoccur in the future as we develop
code. Could you please tell me if there is any other solution?
Both libmesh and our code are compiled on fedora 24 with gcc 6.1.1 with
c++98 flag (gcc 6 is c++ 11 by default). I attached config.log file of
libmesh.
Thank you!
Best regards,
Bozidar
----------------------------------------------------------------------
Bozidar Novakovic
Postdoctoral Research Associate
Purdue University, West Lafayette, IN
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users