Skip to content

Add construct_at, destroy_at wrappers. Use throughout.

Reference issue

What does this implement/fix?

This is the first independent part of my previous merge request 881 !881

This implements wrappers for C++17 and C++20's std::destroy_at and std::construct_at and uses them throughout instead of placement new and explicit destructor calls. Since this is independent of the previous merge request, I chose to take a less targeted approach and change all occurences.

Additional information

Except for a trap in JacobiSVD (where the order of arguments is reversed between subsequent invocations, so simple copy and paste would be wrong) and in IterativeLinearSolvers/IterativeSolverBase.h (where type names are used inconsistently before this patch so the change may look wrong), there are no surprises here.

Merge request reports

Loading