Board index » cppbuilder » Re: Constructor overloading

Re: Constructor overloading


2003-08-15 02:00:07 AM
cppbuilder53
"Martin Moeller" < XXXX@XXXXX.COM >wrote in message
Quote
which is the 'C++ correct' way to implement the otherwise
same code without repeating it?
Place the common code into a separate method which both constructors can
call.
Quote
I've neve seen one contructor calling another one.
That is because C++ does not allow that.
Gambit
 
 

Re:Re: Constructor overloading

"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >writes:
Quote
>I've neve seen one contructor calling another one.

That is because C++ does not allow that.
Hopefully, this "not" is a "not yet". The experts over in
comp.lang.c++.moderated and comp.std.c++ are discussing such a feature, and
I think a formal proposal for its inclusion in the next Standard is submitted.
 

Re:Re: Constructor overloading

"Thomas Maeder [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Hopefully, this "not" is a "not yet". The experts over in
comp.lang.c++.moderated and comp.std.c++ are
discussing such a feature, and I think a formal proposal
for its inclusion in the next Standard is submitted.
I wouldn't know anything about that. Other languages like Delphi and Java
do allow constructors to call each other, so it wouldn't surprise me for C++
to support it someday.
Gambit
 

{smallsort}