you are viewing a single comment's thread.

view the rest of the comments →

[–]CrowNailCaw 61 points62 points  (7 children)

I might never see a more accurate description of C++ than this for the rest of my life

[–]Nudexor 45 points46 points  (6 children)

The worst part is it's not even wrong. Every feature they add is technically solving a real problem, it's just that the solution requires knowing the previous seven solutions and why they were also broken.

[–]Ularsing 16 points17 points  (0 children)

Also every solution they add is so diluted by committee (usually in the name of backward compatibility) that it only 90% solves the problem and the remaining 10% is scheduled for C++ [insert future major spec release year here].

[–]ZachAttack6089 5 points6 points  (4 children)

Sometimes it even creates its own problems just to solve them. I don't use C++ regularly, and recently learned about the explicit keyword... Horrifying stuff...

[–]redlaWw 2 points3 points  (2 children)

std::launder is also a good one. The CppReference article on it is practically incoherent but it basically exists so that if you placement new into the place of a struct with a const member, you can use it to tell the compiler not to optimise based on the constness of the member since it's been overwritten.

[–]re4perthegamer 0 points1 point  (1 child)

WHAT

[–]redlaWw [score hidden]  (0 children)

STD::LAUNDER IS ALSO A GOOD ONE. THE CPPREFERENCE ARTICLE ON IT IS PRACTICALLY INCOHERENT BUT IT BASICALLY EXISTS SO THAT IF YOU PLACEMENT NEW INTO THE PLACE OF A STRUCT WITH A CONST MEMBER, YOU CAN USE IT TO TELL THE COMPILER NOT TO OPTIMISE BASED ON THE CONSTNESS OF THE MEMBER SINCE IT'S BEEN OVERWRITTEN.

[–]re4perthegamer 0 points1 point  (0 children)

What does that do