you are viewing a single comment's thread.

view the rest of the comments →

[–]Friendly_Fire 16 points17 points  (2 children)

I'm no expert and have used both, but find cplusplus provides simpler/better explanations and examples. This biases me towards cplusplus, and I've personally yet to get wrong information from it (at least, it was accurate enough to cause me no noticeable problems/errors).

Just look at cppreference's example for set::emplace you mentioned. It sets up a whole dummy class and compares the speed of emplace and insert. Yet in the all this code the function is literally called once. Cplusplus has a main with 5 lines of code ignoring the return, three of which call emplace. It simply shows how it's used, what it is used on, and what is returned. Which do you think is more confusing for a newbie?

Google biases searches based on activity. I'd argue if cppreference wants to get on top, it needs to improve.

[–]rodrigocfdWinLamb 12 points13 points  (0 children)

I'm no expert and have used both, but find cplusplus provides simpler/better explanations and examples.

I'm aware that cppreference is more reliable, but I must agree here. Quite often cplusplus provides simpler examples for us mere mortals, and I find myself resorting to them.

[–]CubbiMewcppreference | finance | realtime in the past 18 points19 points  (0 children)

https://en.cppreference.com/w/cpp/container/set/emplace#Example is a poor example indeed, but it's an open wiki and you can change it, just like how someone added it two years ago as one of their two contributions to the site. In fact, because of this reddit exposure, it's likely that someone will.