Item 28: Avoid returning "handles" to object internals.(Effective C++)

it2022-05-08  6

Avoid returning handles (references, pointers, or iterators) to object internals. It increases encapsulation, helps const member functions act const, and minimizes the creation of dangling handles.

转载于:https://www.cnblogs.com/zhtf2014/archive/2011/03/30/1999677.html

相关资源:《Effective c 》

最新回复(0)