Topic: c++0x destructors question.
Author: wasti.redl@gmx.net
Date: Tue, 19 May 2009 10:02:14 CST Raw View
On May 15, 10:52 pm, german diago <germandi...@gmail.com> wrote:
> I read some time ago that destructors with classes with virtual
> functions will
> be virtual by default, but I couldn't find any information.
>
> Is this going to happen? I know it's not very important, but it's a
> gotcha in the language.
> Can anyone confirm if that resolution will be finally applied?
It's not in the current draft, so I very much doubt it will happen.
Adding it would break binary compatibility with old code, and the new
standard tries to avoid this.
Sebastian
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: daniel.kruegler@googlemail.com
Date: Tue, 19 May 2009 10:43:26 CST Raw View
On 15 Mai, 22:52, german diago <germandi...@gmail.com> wrote:
> I read some time ago that destructors with classes with virtual
> functions will be virtual by default, but I couldn't find any information.
>
> Is this going to happen? I know it's not very important, but it's a
> gotcha in the language.
> Can anyone confirm if that resolution will be finally applied?
Neither the current working paper nor any currently active
issue seems to be related to this. I also see no closed issue
that rejects this extension. Thus, there is currently nothing
that would support your hope.
A possible reason for hesitating to apply this rule is that
dynamic polymorphism can be used perfectly without any
need for a virtual destructor (you are not enforced to use
the free store to create and destroy objects of polymorphic
types).
Greetings from Bremen,
Daniel Kr gler
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: vandevoorde@gmail.com
Date: Tue, 19 May 2009 15:37:08 CST Raw View
On May 15, 4:52 pm, german diago <germandi...@gmail.com> wrote:
> I read some time ago that destructors with classes with virtual
> functions will
> be virtual by default, but I couldn't find any information.
>
> Is this going to happen? I know it's not very important, but it's a
> gotcha in the language.
> Can anyone confirm if that resolution will be finally applied?
No, I'm pretty sure there is no intent to change the language that
way.
Daveed
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: german diago <germandiago@gmail.com>
Date: Fri, 15 May 2009 14:52:23 CST Raw View
I read some time ago that destructors with classes with virtual
functions will
be virtual by default, but I couldn't find any information.
Is this going to happen? I know it's not very important, but it's a
gotcha in the language.
Can anyone confirm if that resolution will be finally applied?
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]