(C++) operator->
February 24, 2017 · View on GitHub
(C++) operator->
The operator->() (also known as the arrow operator, or dereferencing operator) is a type of operator. It is a unary postfix operator useful for smart pointers.
Advice
- Use operator->() to dereference smart pointers [1]
Reference
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 19.5. Advice. page 576: '[3] Use operator->() to dereference "smart pointers"'