>>646-649
範囲外のイテレータの比較ってokだっけ?
i += hogehoge;する前に、
begin() - i <= hogehoge && hogehoge < end() - i
とした方がいいんじゃないだろうか。