the empty_node thing is literally only a means for RAII (which this snippet is doing) -- however, an out-of-bounds access typically is not expected to return a valid object.