From Jason Turner
Watch on YouTube

Summary

This episode explores the special behavior of the arrow operator (->) in C++, explaining how it uniquely handles operator overloading. Jason demonstrates that when overloading operator->(), any subsequent member access operations are automatically handled by the compiler in a way that wouldn't normally make sense for other operators. The standard specifically defines this behavior, making operator->() automatically chain calls when returning pointer-like types.

Resources

Tags