operator[] is invalid for one past the last element. Using
the pointer to it as end-pointer is fine.
Found by Microsoft STL debug iterator.
virtualSites.emplace_back(VirtualSite{
vsiteType,
virtualSiteIdx,
- { &interactionList.iatoms[i + 2],
- &interactionList.iatoms[i + 2 + numConstructingAtoms] },
+ { interactionList.iatoms.data() + i + 2,
+ interactionList.iatoms.data() + i + 2 + numConstructingAtoms },
{ localTopology.idef.iparams[parameterIdx].generic.buf,
localTopology.idef.iparams[parameterIdx].generic.buf + MAXFORCEPARAM } });
i += defaultIncrement;