Re:std::launder: the most obscure new feature of C++17
by Rucadi on Thursday April 04, 2024 @07:31PM
(#39937108)
In a Memory Mapped device, a read can trigger side effects (in fact, I worked a lot with that), so is not only is about memory.
Re:std::launder: the most obscure new feature of C++17
by cryptonector on Friday April 05, 2024 @12:29AM
(#39938696)
Yes, I'm aware, and thus I said "would". But I wouldn't make use of this without first reading the spec on that very carefully. Thankfully I've not needed this.
See https://www.embedded.com/combining-cs-volatile-and-const-key... for examples, https://en.cppreference.com/w/cpp/language/cv for a more formal description.