Message from C, C++ discussions

January 2020

— Yes
And to allow to chain operator<< calls


Had the copy constructor not been privated wouldn't returning the called object out have served the chaining purpose?

— I don't get the question

— You wouldn't get it

— What happened if class call private ("deleted") itself or friend class/function?

— ?

— Nvm, joker reference)

— I'm talking about public class's interface

— Bad things

— Because question itself is about public interface

— Suppose, the copy constructor is not private in ostream, then if we return the called out object without reference then will the chaining operation not be supported?

Message permanent page

— It would be