Код: Выделить всё
using KinematicGraph =
boost::adjacency_list;
Код: Выделить всё
auto from = reinterpret_cast(std::addressof(mapping.from()));
auto to = reinterpret_cast(std::addressof(mapping.to()));
boost::add_edge(vertexMap[from], vertexMap[to], m_simulationObjectsGraph);
Однако этот код не компилируется.
Код: Выделить всё
[build] In file included from /home/dev/.conan2/p/b/boosta593711c2d7a0/p/include/boost/graph/adjacency_list.hpp:255:
[build] /home/dev/.conan2/p/b/boosta593711c2d7a0/p/include/boost/graph/detail/adjacency_list.hpp:2453:17: error: call to implicitly-deleted default constructor of 'std::variant'
[build] 2453 | bidir_rand_stored_vertex() {}
Если Я удаляю строку add_edge, компилируется нормально.
Вот минимальный пример, показывающий ошибку
https://godbolt.org/z/94bnsj9MP
Подробнее здесь: https://stackoverflow.com/questions/786 ... d-property