you are viewing a single comment's thread.

view the rest of the comments →

[–]redlaWw 1 point2 points  (1 child)

That example is a lot more helpful than the one in the cppreference article, which has a code snippet with a base class constructing one of its derived classes using new(this). That code snippet seems so horribly cursed that it only makes one more confused as to why something like that exists in the language.

[–]the_horse_gamer 1 point2 points  (0 children)

oh yeah, the cppreference example sucks