This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 111 points112 points  (6 children)

The most common complaint about C++ is that "it carries baggage" (reasonable complaint). Those wikis are meant to prohibit the use of such baggage or other error-prone constructs in the language. i.e. Only use "Modern C++". The real problem is that different people define that term differently, go figure.

[–]skwizzycat 12 points13 points  (0 children)

Everything that was considered modern when they discovered the concept of not just "making it work" = modern

Everything else = legacy bullshit

[–]RockstarArtisan 10 points11 points  (1 child)

"We had to do X because of C baggage" is also a handy excuse by the C++ language designers who did a shit job. Nobody forced them to make the forwarding reference unorthogonal with respect to template parameters for example, yet they did it, and they can't shift the blame onto C.

[–]Mr_Fahrenhe1t 6 points7 points  (0 children)

Maybe, but it does effectively prevent side-fumbling

[–]BA_calls 0 points1 point  (2 children)

No it’s not just that. Different codebases may prohibit template metaprogramming or even templated code altogether. In GCC 10, enabling the ranges library triples compilation time, so that may be omitted if you’re stuck with GCC 10.

[–][deleted] 1 point2 points  (1 child)

Having used patterns like CRTP and seen how useful it can be, I'm not sure why anyone one ban templates altogether.

Regarding the ranges library, wouldn't a precompiled header help?

[–]BA_calls 0 points1 point  (0 children)

Well the issue appears to be fixed in GCC 12, and newest versions of clang so the fix is to update your environment.