For some reason both c++ and rust decided to go with "lets make temporaries have insanely short lifetimes! Kill them immediatly at the first semicolon we can!" and I don't know why. (rust at least makes it a compiler error to misuse them, but still annoying.)
C has a much better design with its compound literals having block scope lifetimes.