Hello! (Jean-Marc, are you still awake?)
Recently, I added a couple of new assertions to Paragraph::Pimpl.
Among others, I added:
int Paragraph::Pimpl::eraseChars(pos_type start, pos_type end, bool
trackChanges)
{
BOOST_ASSERT(start >= 0 && start <= size());
BOOST_ASSERT(end > start && end <= size() + 1);
I check for end > start, because the caller of eraseChars may mistakenly
assume that end is the last char (but in fact end - 1 is).
However, it turns out that eraseChar() is called by CutAndPaste.C
without a prior check whether there is actually a character to delete
(e.g. start and end are both 0).
What shall I do? Loosen the above assertion (end >= start) or surround
several calls to eraseChars by if(...) statements?
Michael