Skip to content

Draft: Adds move constructor/assignment operator to GenEvent.

  • Adds move constructor/assignment operator to GenEvent.

    • This makes a specific 3rd part framework interface that returns GenEvent (or really, std::optional) instances, but cannot make use of copy-elison by NRVO, quick again. We could redesign to ensure copy-elison, probably, but I cannot see a reason not to have enable move semantics for GenEvent.
  • GenEvent copy constructor/assignment operators now also copy the run_info shared_ptr

    • After a brief email exchange with Andrii, we think this is just an oversight that hasn't caused any problems because people don't usually copy GenEvent objects or access the run_info via them? Andrii suggested that I check with @lonnblad and @abuckley whether they can think of a reason that this run_info shared_ptr propagation is actively not done in the copy assign/construct. Any thoughts?

! TestIO10 fails for this MR because the ReaderMT gives each threads parsed events a separate copy of the run_info. When the whole vector of MT-read events is then written out, the AsciiWriter complains that subsequent events have a different run_info instance than the first event. This didn't used to happen because the push_back by value onto the holder-vector in the test would erase the run_info. Adding a evt.set_run_info(nullptr); after the read_event(evt) call forces the test to pass again, but I think this highlights an additional issue that we should discuss. Hence this is left as a draft.

Merge request reports