KaMIS icon indicating copy to clipboard operation
KaMIS copied to clipboard

error: reinterpret_cast from 'nullptr_t' to 'kway_graph_refinement_commons *' is not allowed

Open yurivict opened this issue 2 years ago • 1 comments

clang-13 prints this error:

/disk-samsung/freebsd-ports/math/kamis/work/KaMIS-2.0-19-g254fd16/extern/KaHIP/lib/partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement_commons.cpp:28:111: error: reinterpret_cast from 'nullptr_t' to 'kway_graph_refinement_commons *' is not allowed
                        m_instances = new std::vector< kway_graph_refinement_commons*>(omp_get_max_threads(), reinterpret_cast<kway_graph_refinement_commons*>(NULL));
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

yurivict avatar Jul 01 '22 08:07 yurivict

FYI: NULL isn't recommended in C++. On BSDs it is evaluated to 0.

yurivict avatar Jul 01 '22 08:07 yurivict