Opened 5 years ago

Last modified 5 years ago

#891 new discussion

mutable BamReadIterator

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.x+
Component: omic Version: 0.14.3
Keywords: Cc:

Description (last modified by Peter)

Is there any good reason why BamReadIterator is a const iterator, i.e., it is not allowed to modify the underlying data?

My use case is that I copy reads from BamReadIterator to a std::vector<BamRead> with something like

for (; iter!=end; ++iter) {
  if (some_condition(*iter))

Since I don't access the read after the push_back, it would be nice to avoid the copying in push_back with a move, but that would require that *iter return non-const BamRead&.

Change History (1)

comment:1 Changed 5 years ago by Peter

Description: modified (diff)
Note: See TracTickets for help on using tickets.