220 29564 <4492941.84y7YFDmgl@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Instantiation of default destructor
Date: Mon, 28 Nov 2016 13:14:35 -0800
Lines: 41
Approved: news@gmane.org
Message-ID: <4492941.84y7YFDmgl@tjmaciei-mobl1>
References: <CAKgx6B+8zzZ131-UZobmUvCgB4YeQ1+wTZadcuT6ieDCofDndg@mail.gmail.com> <2895021.stej6Iglf8@tjmaciei-mobl1> <CAKgx6BL5vumvSnaTPm2HW=72hGnEV4p=WBCZTSueWHOO6-_icA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1480367681 341 195.159.176.226 (28 Nov 2016 21:14:41 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 28 Nov 2016 21:14:41 +0000 (UTC)
User-Agent: KMail/5.3.3 (Linux/4.8.8-1-default; KDE/5.28.0; x86_64; ; )
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBPN46LAQKGQES36FNGY@isocpp.org Mon Nov 28 22:14:36 2016
Return-path: <std-proposals+bncBCB4TK757YBRBPN46LAQKGQES36FNGY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBPN46LAQKGQES36FNGY@isocpp.org>)
	id 1cBTFy-0007IZ-K7
	for gclcip-std-proposals@m.gmane.org; Mon, 28 Nov 2016 22:14:34 +0100
Original-Received: by mail-lf0-f70.google.com with SMTP id o141sf59997497lff.7
        for <gclcip-std-proposals@m.gmane.org>; Mon, 28 Nov 2016 13:14:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:user-agent:in-reply-to:references
         :mime-version:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=sZUjl34zOKx/GI6iXpG2CLbJAlYztSz63x8w7S0VH08=;
        b=x1uS3OiEfreFJ1Lg4FLX8lWEeo13DvA7ZSE4KRAXS+ji045+xeIGb6nuOgRMs5pRcQ
         Szcfpu9LjpZWzekVBgcdYz/9elnKU91EfD/sGyvEF5NqTZYfQxGMRXjhbEJLPVSQnQjw
         W8arXVlvqRMYyL5livoNw06gp7KOlSNYtV1ILzsbuyycmRlxM0jkNMx2CvYsf3CutAHB
         ppUr46UAl+uYS35ylkJ4d+WiUrp1Wh2MTwdfuprA+d6Nqm8WyV3Ip7CI6BrjF2zpgXIB
         F4CcFv14yb2jQuG75lSx6+4KyojXdDqE8xQcIBdGM3J819WYBUoFawxSzgW6exAhAB2N
         jebg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=sZUjl34zOKx/GI6iXpG2CLbJAlYztSz63x8w7S0VH08=;
        b=OPNA89yVqsTFrDjOg/PEHbtuqiJ0wIN1Qb12k5Pj71GcuOfxlURd8qGXBtoqJNJvrT
         5YOPeaWZxCrOsqB7FDM9h5i3FXi42bmHjKSGr8OZ7xoGZh+JxxZwdz4GPB7PCDbRFGn6
         OQukKH9WHvxuQKwgL0hQcXK8JDgFuyzeXEeJKKoYOfqwZd6c54glG5TYePdVbzIpZ4y5
         TkJzbYa3CRlptFsYfIOGH3nR8/AHdPaDySyHYFDhSuv9sHt/Oz8CzM12li1JOH9wBANT
         gMehr5chCKWhjuatHLx1KNuDrzNdla3Po4/1WWX+4AnKTmEATx1OZ9okhi7j10h8esvd
         YAeA==
X-Gm-Message-State: AKaTC039f7SJrdWxsIG+gU5/nHJ5Sfks0+WISknCEBfN0uw5xiCFCN2bL8SDnU7RBNpEvw==
X-Received: by 10.25.75.22 with SMTP id y22mr2108301lfa.25.1480367678720;
        Mon, 28 Nov 2016 13:14:38 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.166.142 with SMTP id p136ls2619271wme.0.canary-gmail; Mon,
 28 Nov 2016 13:14:37 -0800 (PST)
X-Received: by 10.194.171.66 with SMTP id as2mr24606462wjc.77.1480367677350;
        Mon, 28 Nov 2016 13:14:37 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id o8si56106961wjg.205.2016.11.28.13.14.37
        for <std-proposals@isocpp.org>;
        Mon, 28 Nov 2016 13:14:37 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [134.134.139.77])
	by gondolin.macieira.info (Postfix) with ESMTPSA id A3F2C11A1D6
	for <std-proposals@isocpp.org>; Mon, 28 Nov 2016 13:14:36 -0800 (PST)
In-Reply-To: <CAKgx6BL5vumvSnaTPm2HW=72hGnEV4p=WBCZTSueWHOO6-_icA@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:29564
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29564>

On segunda-feira, 28 de novembro de 2016 21:21:35 PST Domen Vrankar wrote:
> 2016-11-28 20:42 GMT+01:00 Thiago Macieira <thiago@macieira.org>:
> > On segunda-feira, 28 de novembro de 2016 20:17:12 PST Domen Vrankar wrote:
> > > A::A(int i) {} // implementation of the first constructor so destructor
> > 
> > is
> > 
> > > generated here as if writing A::~A() = default; after this line
> > 
> > Your comment makes an invalid assumption. The destructor is not generated
> > there.
> 
> Lost me... Where then? 

Wherever it is used.

Actually, this depends on the ABI and there could be an ABI that works like 
you described. Except that the two major ABIs (Microsoft's and the IA-64 one) 
don't operate like that: they operate like I described.

> Meaning 'not generated there currently' or 'not
> generated there even if A::~A() = default; would be written there' as this
> was not meant as how it works now but what I've proposed.

If you'd written A::~A() = default; there, you'd get a compilation error.

> I always expected that that's the point where compiler prepares the
> destructor is the point where it finds it in the code.

Right, now you know better.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/4492941.84y7YFDmgl%40tjmaciei-mobl1.

.
