root icon indicating copy to clipboard operation
root copied to clipboard

Ensure basic data classes are nothrow_move_constructible

Open abarton5 opened this issue 6 months ago • 0 comments

Explain what you would like to see improved and how.

Consider the following struct:

struct mylovelyDataType{
   std::vector<std::vector<double>> massivedata;
  TLorentzVector roottype;
}

The presence of TLorentzVector here caused (std::is_nothrow_move_constructible_v<mylovelyDataType>) to equal false this means that various cases cannot be optimized such as the expansion of the vector std::vector<mylovelyDataType>

This can be rectified by adding noexcept to the copy constructors of TLorentzVector in this example. But should be expanded to all basic data types.

ROOT version

Latest version

Installation method

Any

Operating system

Any

Additional context

No response

abarton5 avatar Jun 14 '25 05:06 abarton5