Fails to build with GCC 12 (pre-release)
Fedora Linux just updated to a pre-release of GCC 12 in Rawhide (the development version), and graph-tool
now fails to compile.
The problem is related to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2166r1.html; see also https://github.com/nlohmann/json/issues/3138#issuecomment-1014341727.
/usr/include/boost/graph/bellman_ford_shortest_paths.hpp:158:26: error: use of deleted function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::nullptr_t = std::nullptr_t]'
158 | put(distance, s, weight_type(0));
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/12/string:53,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/streambuf:41,
from /usr/include/c++/12/bits/streambuf_iterator.h:35,
from /usr/include/c++/12/iterator:66,
from ../../../src/graph/graph.hh:23,
from ../../../src/graph/graph_filtering.hh:21,
from graph_bellman_ford.cc:18:
/usr/include/c++/12/bits/basic_string.h:732:7: note: declared here
732 | basic_string(nullptr_t) = delete;
| ^~~~~~~~~~~~
A full build log is attached.
It’s not immediately obvious to me whether the bug is actually in graph-tool
or in Boost.Graph—but I’m happy to try out any candidate fixes or otherwise investigate further.