Strictly speaking, it's against the rules, but there's no practical way it could become unsafe in practice. This would be formalized using nonescaping types where a value dependent on an immortal value is itself immortal. And it looks like it does compile down to a global array constant and a direct pointer access: Compiler Explorer
2 Likes