write outside of a buffer,
the default is always either an attempt to resize the buffer or
an error of some kind (e.g., by raising an exception).
That's because it's extremely easy to accidentally attempt to read
or write outside of a buffer.
<p>
However, C and C++ are different.
C++ has evolved to become somewhat safer (e.g., through smart pointers),
In C and C++, attempting to do actions like read or write outside a buffer is
in many cases
<i>undefined behavior</i>, and when undefined behavior occurs,
<i>