Closed ralfulrich closed 3 years ago
The error occurs with -std=c++17
, however not with -std=c++14
(both g++ (GCC) 9.2.0).
Thank you for reporting this bug. There is a name clash, somewhere rank
is used without being properly qualified by a namespace.
Link to reproduce: https://godbolt.org/z/oK4866
Only gcc seems to be affected and only versions starting with 7.1
It looks like a bug in gcc. A workaround is to replace line 82 in boost/type_traits/rank.hpp
with
template <class T> using rank = integral_constant<std::size_t, (::boost::detail::rank_imp<T, 0>::value)>;
Minimal example to reproduce the problem without including boost at all:
msvc is OK, clang is OK, gcc fails
Simple workarounds for the gcc bug were found by Thomas Ferrand and John Maddock. Those will be applied tomorrow. Next release 1.75 will have the fix for this.
gcc bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97663
fixed in develop
The following minimal program
fails to compile with
on an ubuntu 18.04 docker container with gcc7.5.0 and boost-headers 1.74
To reproduce, e.g.
sudo docker run -v $PWD:/corsika -it corsika/devel:u-18.04 /bin/bash
and then compile the above mini program, while putting the boost headers right there.