Comment

Comment by 4bpp

I haven't encountered any context in which it would add value (i.e. you can't just figure out yourself where it will go out of scope and delete at that point, which also makes the code clearer), and all other things equal, using it hides the semantically relevant type (the interesting part of a unique_ptr<A> is the A, not the unique_ptr!) and makes code and error messages harder to read.
parent 4bpp 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton