Undefined behaviour in c++ | Hacker News Reader