Comment

Comment by towergratis

The real problem is not specific to C++, memory or shared pointers, but as the author mentions later, the fact that "function parameters evaluation order is unspecified".

The problem is similar in C as well.

`printf("%d, %d", i++, i++);` will give you different results depending on the compiler.

parent towergratis 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton