On Aug 24, 2025, at 6:21 PM, organicoman via Std-Proposals <std-proposals@lists.isocpp.org> wrote:


But library implemented and low level will definitely use raw pointers....just show me how many std::vector implementation uses smart pointers for its internal data pointer.

No std::vector uses smart pointers because they were implemented before smart pointers were a thing. And changing that would break the ABI (programs wouldn’t link with existing libraries). Also, this is a completely different discussion: classes can ensure invariants on their member variables and we have RAII. As long as we don’t leak raw pointers from a member variable we are reasonably safe.

And again: Even for low-level code you should start using unique_ptr. There maybe special cases were they don’t work, but in 90% of the cases there is no reason to not use them.

--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals