J
Jakob Bieling
Hi,
Recently, I have seen code where the assignment operator has a return
type 'void'. I do understand that it is a 'bad idea' in the sense that I am
limiting myself, when using that operator= (ie. v = w = x would not be
possible). But I asked myself if this is legal. Even though I would not know
why this should be illegal (Standard did not give me a clue either), I am
not 100% sure.
Second question is about (copy) c'tors: Am I right in saying that a copy
c'tor is provided by the compiler whenever there is now copy c'tor (but
there may be other c'tors)? Also, a default c'tor is only provided by the
compiler, when there is no c'tor at all, correct?
Thanks!
Recently, I have seen code where the assignment operator has a return
type 'void'. I do understand that it is a 'bad idea' in the sense that I am
limiting myself, when using that operator= (ie. v = w = x would not be
possible). But I asked myself if this is legal. Even though I would not know
why this should be illegal (Standard did not give me a clue either), I am
not 100% sure.
Second question is about (copy) c'tors: Am I right in saying that a copy
c'tor is provided by the compiler whenever there is now copy c'tor (but
there may be other c'tors)? Also, a default c'tor is only provided by the
compiler, when there is no c'tor at all, correct?
Thanks!