It’s important for objects that can be dereferenced. Smart pointers have methods that can be accessed with dot syntax like swap(). You can still dereference through a smart pointer using arrow syntax to access methods on the referenced type since they overload the operator->() method.
It’s important for objects that can be dereferenced. Smart pointers have methods that can be accessed with dot syntax like
swap()
. You can still dereference through a smart pointer using arrow syntax to access methods on the referenced type since they overload theoperator->()
method.