For the two first examples, there are no bounds checks. Bounds checks are expensive. What you get is undefined behavior. Symptoms in this case are you get garbage, but you could also get a segfault.
Your third example use the _
placeholder to extract a row. Upon construction of the MatrixRow
object, which represents the concept of the row, an exception is thrown because there is no such row. You can reason that it is worth here to do a bounds check since it checks "the whole row".
Your last example looks like a bug. probably in Vector::offset