|
|
|
|
|
by virgilp
2119 days ago
|
|
I developed an optimizing C++ compiler in my youth (one that was actually used in production, not just a pet project). I probably know the actual cost, and also know it may depend on compiler. But that's not the point - the point is that smart pointers never claimed to be zero-cost abstractions, AFAIK. |
|
> I mean, who doesn't know that smart pointers can be slower than raw pointers?
Nobody... on what basis? If you're not in that set of people, that doesn't imply the set is small or empty. Googling suggests lots of people have given such advice, and, may I suggest, it's not because they were stupid.