3 ms·
> Linus was wrong about many things in his rant. This being one of them. Its not what is being discussed here. C++ has an implementation defined memory model.
by Galanwe 5y ago
> Linus was wrong about many things in his rant. This being one of them.
Its not what is being discussed here. C++ has an implementation defined memory model. That just cannot work with Linux out of the box. You need an OS and compiler designed from the ground up to handle this.
- kccqzy 5y agoC++ has a well defined memory model: https://en.cppreference.com/w/cpp/language/memory_model https://en.cppreference.com/w/cpp/language/memory_model And it's not that different from the C memory model. How did Linux work with C?
- Galanwe 5y ago> C++ has a well defined memory model Only since C++11, and it's not a full blown memory model.
- jcelerier 5y agoit's defined enough for C to have adopted it since C11 (https://people.mpi-sws.org/~viktor/papers/cpp2015-invited.pdf https://people.mpi-sws.org/~viktor/papers/cpp2015-invited.pd...)
- gpderetta 5y agoC++ has with a close, approximation, the same memory model as C, both concurrent and otherwise. In fact C11 just adopted the C++11 concurrent memory model wholesale.