Message from C, C++ discussions

January 2020

— 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?

— It would be

— Then we need to understand what it means to copy a stream

— Because we have the object to call operator<< on

— Dont forget that stream writes the stuff to a file. Like, would a file be copied too?

— Nah, his question is more about expression evaluation

— Imo its not the thing to bother about first here

— I didn't get the following statement below:

if for any reason a base class fails to have a default constructor that's callable from a deriving class—that is, a public or protected constructor that takes no parameters—then a class that derives from it cannot automatically generate its own default constructor.

Message permanent page

— If base class doesnt have default ctor, derived wont have it unless you provide it

— Hi

— What is this ? Why it's here?