As someone who frequently writes JavaScript, I find myself particularly drawn to the syntax of this feature. While I'm uncertain about its nomenclature, here's an illustrative example:
object.function1().function2().function3()
I understand that JavaScript allows for this due to its treatment of everything as a first-class object. However, I am curious if similar functionality can be achieved in C++. Could you provide a brief example showcasing this?