From 8190746535320793676
X-Google-Thread: 7894ca11fe,ca1d48828e7eb066
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 16 Oct 2009 09:40:17 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Francis Glassborow <francis.glassborow@btinternet.com>
Newsgroups: comp.std.c++
Subject: Re: Keyword abstract for pure virtual functions in c++0x
Organization: unknown
Sender: cppmods@cs.rpi.edu
Approved: stephen.clamage@sun.com
Message-ID: <Co6dnc9wRrGO_EXXnZ2dnUVZ8gli4p2d@bt.com>
References: <64708d1f-cb87-4e3b-a1c8-845c98490c25@o41g2000yqb.googlegroups.com>
	<06f78e41-2741-4217-9d79-94bd729418d7@f20g2000prn.googlegroups.com>
	<bbf88ecc-b3d1-411d-8244-37d5ae0ba0e7@y21g2000yqn.googlegroups.com>
	<b5bfe751-18ad-4e94-b0cb-cf72efb190f7@r24g2000prf.googlegroups.com>
	<jYmdnfcg9J3wZUnXnZ2dnUVZ8lpi4p2d@bt.com>
	<1f008923-3930-4613-a4b9-1c575d97774a@k13g2000prh.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Fri, 16 Oct 2009 13:03:25 +0100
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Fri, 16 Oct 2009 09:31:06 CST
Lines: 32
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-XLs+tbh1WfPDvmJ43p8vkWbLGTs2PSrZrc4/JrDPsKa9r+h/y8ipD2Al3xYYqSzJffXjlzQXiUa9w4z!JG6e4biMsDTb56s2+zRFcnn6xVaDDXII1Y7CiSARB0I8PCJCP3bqo0rLp3vd1EQ3+b5T
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news2.google.com comp.std.c++:1496

Sean Hunt wrote:
> On Oct 14, 12:37 pm, Francis Glassborow
> <francis.glassbo...@btinternet.com> wrote:
>> Of course they notice because of the way that dtors chain together
>> which is why you have to define your dtor even if you have declared it
>> a pure virtual.
> 
> Yes, but because the compiler defines a destructor for you if you
> don't provide one, all classes inheriting from it will always provide
> a replacement definition, so the pureness of a destructor won't affect
> any inheritors.
> 
> Sean Hunt
> 
> 
No, the compiler only provides one if you have not declared it. As soon
as you write:

virtual ~mytype() = 0;

you have declared it and the compiler is not at liberty to generate one
for you (even though it would make some sense to allow that. Declaring
any function as a pure virtual simply requires that the function is to
be defined in derived classes it does not prevent definition within the
base class.

-- 
[ 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                      ]



