you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 2 years ago

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.

  • source
  • parent