gudhi-devel icon indicating copy to clipboard operation
gudhi-devel copied to clipboard

noexcept move constructor & assignment

Open mglisse opened this issue 1 year ago • 0 comments

https://github.com/GUDHI/gudhi-devel/blob/8266dc84888001f459d57425e1a31989046913e4/src/Simplex_tree/include/gudhi/Simplex_tree.h#L351

I notice that the move constructor and assignment of Simplex_tree are not marked noexcept. Is there a good reason for that? I didn't check in depth, but the reason seems to be a sanity check in debug mode, which does not strike me as super important. If that is indeed the only reason, I would suggest marking the 2 functions noexcept at least if not GUDHI_DEBUG. Debug mode is less important, we can either keep them throwing, or mark them noexcept which would turn an exception (which is never supposed to fire) into terminate, or remove the sanity check, or whatever.

mglisse avatar Mar 05 '23 22:03 mglisse