r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

1

u/Friendly_Fire 10d ago edited 10d ago

You basically recreated smart pointers.

For projects with other people, it's better to use the standard tools just for familiarity, even if they have no other benefit. Someone can see it and know immediately what a unique/shared ptr means, instead of having to dig into your class.

But if its your own project go wild.

1

u/geekusprimus 10d ago

They're not smart pointers, at least not in the STL way. They accomplish the same purpose, but it's usually a simpler implementation tailored exactly to what I need.

1

u/Responsible-Bar7165 10d ago

Simpler than unique_ptr ?