 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Steven T. Hatton Guest
|
Posted: Sat Dec 16, 2006 3:51 am Post subject: Constructor Chaining |
|
|
A long time ago I was told there was discussion of introducing to C++ the
ability of a constructor to call another constructor of the same class.
This is a feature found in Java which seems to make a lot of sense, and, as
far as I am aware, introduces no fundamental problems. This is different
from the existing C++ facility for calling a base class constructor in the
member initialization list. What happens is that one constructor calls
another constructor of the same class as if it were any other member
function.
Has that functionality been discussed by C++ language designers?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Vidar Hasfjord Guest
|
Posted: Sat Dec 16, 2006 7:37 am Post subject: Re: Constructor Chaining |
|
|
"Steven T. Hatton" wrote:
| Quote: | A long time ago I was told there was discussion of introducing to C++ the
ability of a constructor to call another constructor of the same class.
[...]
Has that functionality been discussed by C++ language designers?
|
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Pedro Lamarão Guest
|
Posted: Mon Dec 18, 2006 5:07 pm Post subject: Re: Constructor Chaining |
|
|
On 16 dez, 05:37, "Vidar Hasfjord" <vattilah-gro...@yahoo.co.uk> wrote:
There is an implementation for GCC here:
http://mndfck.org/~pedro.lamarao/projects/c++0x/
It is provided as a patch to the current mainline version, and has just
a couple of test cases.
--
Pedro Lamarão
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|