220 17453 <CANu6V4WK_hMKt+dgRJpJu2FPGxFEoGU96P07KFMbNW+SwwLimw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Johannes Schaub <schaub.johannes@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: In-class definition of pure virtual functions
Date: Wed, 22 Apr 2015 17:49:37 +0200
Lines: 32
Approved: news@gmane.org
Message-ID: <CANu6V4WK_hMKt+dgRJpJu2FPGxFEoGU96P07KFMbNW+SwwLimw@mail.gmail.com>
References: <eec88219-93b2-4c36-b4b2-8c7aa96afa60@isocpp.org>
	<55377A89.7000807@gmail.com>
	<06dcb70f-d339-477f-9b03-38e4e57c90da@isocpp.org>
	<CAGg_6+PRfC1qegoXMEPhgSCM6uO3dVkxH+uLjNAOY3JOR-WvOQ@mail.gmail.com>
	<CANu6V4WmWstk0txR6iXuu_oqDDexOViV2-1Yfzk5z8PEG=TOZw@mail.gmail.com>
	<CAGg_6+ObH-qe+P1ss+vV2MpAsQF5qJsEoEATR7CBo+6DJSq2mQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1429717786 685 80.91.229.3 (22 Apr 2015 15:49:46 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 Apr 2015 15:49:46 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCQPNCEZSQNBBE4G36UQKGQEPL4ZCHY@isocpp.org Wed Apr 22 17:49:42 2015
Return-path: <std-proposals+bncBCQPNCEZSQNBBE4G36UQKGQEPL4ZCHY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f72.google.com ([209.85.220.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCQPNCEZSQNBBE4G36UQKGQEPL4ZCHY@isocpp.org>)
	id 1YkwuD-0005we-0C
	for gclcip-std-proposals@m.gmane.org; Wed, 22 Apr 2015 17:49:41 +0200
Original-Received: by pacyx8 with SMTP id yx8sf421101836pac.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Apr 2015 08:49:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=iSPgcOEwBRpMv+be2OqAeoJN5ucfyfqjyXBa3lHsqF8=;
        b=PzITXEPPj6xffPKY+FGUY/D2NBxK6YbXSeK/OSDkhCey1BM0hjvXD4PI+2yddSk/I+
         xXqulK83F+qzGsibv/BDug9p0EzCqUqJhX6w6650v2cPLdtoMFGFLUEwLxaTkXEtREs6
         AGLDor+Qi/3Zw6K1WSag7VS0NFg0EbasROp4qGSEH7qwUdqO7OHjo/ivBHb4v0qZjckC
         oMBrKNxNDDxM23lBxfJho2Buzlv14suZxFnT0gosT7x3rtkybgxX5yR0v/JbqypziG6r
         1SoLUUbhiNsZsrW0j7edC8qVC7vcEQlcl6xbXGvqwIIfEjJOxu+IwppeiREgJ39Xy9aO
         nbYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=iSPgcOEwBRpMv+be2OqAeoJN5ucfyfqjyXBa3lHsqF8=;
        b=BnBjE8dKq51rTffzP2RmPDfCoGU/DXG7cBjQxsdDg11tvGvfILRRYg61MwgvTtDFxm
         bCgg4G9sVeVz+osjRSUZ7e5MolReW9tcZ9n3hAPsbUiTwbouPy2EvYaTH+Q61Ek7rTsk
         DSNHqEHLZkGityYi58BcC1idaCZrFxLRIaejmIwd4fKO2pMszOeiD6c7/qhXMCUjKA6o
         jf4Fk8Wqod8q6sVlWYjg5cgi8aqtOIWAHNyQHYnNlj/gBtDdgnOIxQCB2hqFopg6Zp9G
         sUL4yWkSnGu2yugsw/NBuYlhD0b6rzguvv61eKXSETcNO9munRARkAGTnS6CNFLTFQDW
         scbw==
X-Gm-Message-State: ALoCoQkV8zQ0sCwhtIozLZZdrwJHHUVrtJAHxDOrSw40cNUifDm69yNhz60ZQ/nOozohZko7LCCJ
X-Received: by 10.70.44.164 with SMTP id f4mr3254385pdm.3.1429717779847;
        Wed, 22 Apr 2015 08:49:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.37.72 with SMTP id l69ls584461iol.23.gmail; Wed, 22 Apr
 2015 08:49:39 -0700 (PDT)
X-Received: by 10.42.20.197 with SMTP id h5mr10352401icb.22.1429717779102;
        Wed, 22 Apr 2015 08:49:39 -0700 (PDT)
Original-Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com. [2607:f8b0:4001:c05::235])
        by mx.google.com with ESMTPS id f1si13790828igt.11.2015.04.22.08.49.39
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 22 Apr 2015 08:49:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c05::235 as permitted sender) client-ip=2607:f8b0:4001:c05::235;
Original-Received: by igblo3 with SMTP id lo3so111528igb.0
        for <std-proposals@isocpp.org>; Wed, 22 Apr 2015 08:49:37 -0700 (PDT)
X-Received: by 10.107.133.27 with SMTP id h27mr37291374iod.31.1429717777888;
 Wed, 22 Apr 2015 08:49:37 -0700 (PDT)
Original-Received: by 10.107.51.69 with HTTP; Wed, 22 Apr 2015 08:49:37 -0700 (PDT)
In-Reply-To: <CAGg_6+ObH-qe+P1ss+vV2MpAsQF5qJsEoEATR7CBo+6DJSq2mQ@mail.gmail.com>
X-Original-Sender: schaub.johannes@googlemail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c05::235
 as permitted sender) smtp.mail=schaub.johannes@googlemail.com;
       dkim=pass header.i=@googlemail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:17453
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/17453>

2015-04-22 17:41 GMT+02:00 Nevin Liber <nevin@eviloverlord.com>:
> On 22 April 2015 at 10:35, Johannes Schaub <schaub.johannes@googlemail.com>
> wrote:
>>
>> 2015-04-22 16:32 GMT+02:00 Nevin Liber <nevin@eviloverlord.com>:
>> > On 22 April 2015 at 06:01, Columbo <r.hl@gmx.net> wrote:
>> >> virtual ~MyClass() = 0 = default;
>> > Why can't this particular use case (not being able to
>> > instantiate the base class) be done today with protected constructors?
>>
>> I am not sure whether this is *the* usecase I have in mind for =0 on
>> destructors. My prime usecase for it would be to make a class abstract
>> without having the programmer of the derived class to write an
>> implementation of the method (the compiler does it itself).
>
>
> Again, why don't protected constructors cover this case?  I'm just not
> seeing it.
>

You still need a virtual destructor to have the class be polymorphic
and allow delete through base class ptr. With the "=0" you get both
with only one declaration.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
