Re:std::launder: the most obscure new feature of C++17
by CraigRo on Tuesday April 02, 2024 @05:45AM
(#39903893)
This is an April folks joke
[ Parent
| on HN ]
Re:std::launder: the most obscure new feature of C++17
by hifromwork on Thursday April 04, 2024 @09:06AM
(#39929906)
I don't think this is true
Re:std::launder: the most obscure new feature of C++17
by perihelions on Thursday April 04, 2024 @04:40PM
(#39935532)
The C++ language standard is not a funny joke.
Re:std::launder: the most obscure new feature of C++17
by MaxBarraclough on Thursday April 04, 2024 @04:43PM
(#39935575)
Agreed. Brevity is the soul of wit, and all that.
Re:std::launder: the most obscure new feature of C++17
by 1letterunixname on Thursday April 04, 2024 @05:02PM
(#39935769)
It's the art of making the juggling with swords seem safe and easy while making a daily commute through a minefield of UB seem routine.
Re:std::launder: the most obscure new feature of C++17
by MaxBarraclough on Friday April 05, 2024 @04:39PM
(#39946922)
And there's a second minefield called the portable build solution, but we don't talk about it much.
Re:std::launder: the most obscure new feature of C++17
by selimnairb on Thursday April 04, 2024 @04:41PM
(#39935555)
> Don’t ask. If you’re not one of the 5 or so people in the world who already know what this is, you don’t want or need to know.
The attitude rings true though. I am convinced that C++ is proof that we have discovered alien technology, and it is awful.
Re:std::launder: the most obscure new feature of C++17
by ericdfoley on Thursday April 04, 2024 @04:56PM
(#39935710)
The thing is that there is probably a lot of existing C++ code that is UB without std::launder (similarly to aliasing rules.) The main problem is that the C++ object lifetime rules are not well understood by most people writing C++ code.
Re:std::launder: the most obscure new feature of C++17
by sqeaky on Thursday April 04, 2024 @05:43PM
(#39936125)
I hadn't even considered the task of going through old code and using this to make it more compliant, this is a great use case for this feature.
Re:std::launder: the most obscure new feature of C++17
by MaxBarraclough on Thursday April 04, 2024 @04:41PM
(#39935556)
It is not. It links to a lengthy StackOverflow thread about std::launder.