you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 2 years ago (1 child)

Yeah... But it's usually a good practice to put a struct somewhere between your 30 levels of ownership.

Exceptions exist, but they are not very common. Also, in C++, operators overloading may help you if you keep needing to write code like this.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    In C++ you should never have owning raw pointers. Unless you have a good reason™.

    Raw pointers are great, but not for ownership.

  • source
  • parent
  • hideshow 2 child comments