220 8236 <52B8D5AE.5050109@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Continuing with "auto" and destructors
Date: Tue, 24 Dec 2013 08:30:38 +0800
Lines: 37
Approved: news@gmane.org
Message-ID: <52B8D5AE.5050109@gmail.com>
References: <CANu6V4Xiart=c9bNGWS96VZeSv757MrDTXV0zY1eaF_49hXueQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: ger.gmane.org 1387845041 11843 80.91.229.3 (24 Dec 2013 00:30:41 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 24 Dec 2013 00:30:41 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBM5L4OKQKGQETRUCUMQ@isocpp.org Tue Dec 24 01:30:47 2013
Return-path: <std-proposals+bncBCW25A7E3QCRBM5L4OKQKGQETRUCUMQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f199.google.com ([209.85.214.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBM5L4OKQKGQETRUCUMQ@isocpp.org>)
	id 1VvFtV-0005b9-I7
	for gclcip-std-proposals@m.gmane.org; Tue, 24 Dec 2013 01:30:45 +0100
Original-Received: by mail-ob0-f199.google.com with SMTP id gq1sf25701098obb.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 23 Dec 2013 16:30:44 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=Yo9QvMpRMdcnOz0mCYmc75OPrlOC/EHKiL47j1X1BcI=;
        b=nAfHFo2Vg5Uqkcl7QtfJfiSOkOSNCaJ3IcCPhNzHJc9oFhlmSZNbpahksWMJn6KE4B
         +BXcv50A3dWuFHdFLdMX2oAm5gH9mGacdF0E/Sw35vGkdarqeWRocS3ucIk29pCHLiJQ
         /yHGy3+cP5VTE8W//ydW/L4P+KSqVTDbOfxpQnKxJaR2YelIuYVjF2MqYxbGDI7rU+CQ
         ue/3CWuCNwNn5z+xhhFoToK8m7mOx8czBv89INjk9JrhKW5jPojnCmLvC2bBB/D7W3pl
         top6zTiUoEdCjUaXff6kepznPz9pkXKZrETlx9Clil0hrfi4A3X62RkSwzvAQoN/Pi+P
         sXgQ==
X-Gm-Message-State: ALoCoQkWBc+gy6zCDoXnCBmSobGikCuPDZHkItxZ3jXQOKZVIHFzMVfD1JFxmCLWdt5bj20KaCE9
X-Received: by 10.182.74.226 with SMTP id x2mr11333883obv.1.1387845044320;
        Mon, 23 Dec 2013 16:30:44 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.37.195 with SMTP id a3ls1787565qek.88.gmail; Mon, 23 Dec
 2013 16:30:43 -0800 (PST)
X-Received: by 10.236.77.231 with SMTP id d67mr34632yhe.113.1387845043844;
        Mon, 23 Dec 2013 16:30:43 -0800 (PST)
Original-Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com [2607:f8b0:4003:c01::22a])
        by mx.google.com with ESMTPS id v1si19349253yhg.226.2013.12.23.16.30.43
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 23 Dec 2013 16:30:43 -0800 (PST)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:4003:c01::22a as permitted sender) client-ip=2607:f8b0:4003:c01::22a;
Original-Received: by mail-ob0-f170.google.com with SMTP id wp18so6076084obc.15
        for <std-proposals@isocpp.org>; Mon, 23 Dec 2013 16:30:43 -0800 (PST)
X-Received: by 10.60.84.138 with SMTP id z10mr19680785oey.4.1387845043491;
        Mon, 23 Dec 2013 16:30:43 -0800 (PST)
Original-Received: from Davids-MacBook-Pro.local ([121.54.54.60])
        by mx.google.com with ESMTPSA id g4sm25802360obe.5.2013.12.23.16.30.41
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 23 Dec 2013 16:30:42 -0800 (PST)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To: <CANu6V4Xiart=c9bNGWS96VZeSv757MrDTXV0zY1eaF_49hXueQ@mail.gmail.com>
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:4003:c01::22a as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8236
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8236>

On 12/24/13 8:11 AM, Johannes Schaub wrote:
> Now that in C++14 we will have
>
>      x -> ~auto()

News to me. How is this allowed? Referring to N3797, I don't see any 
provision in the grammar of 5.2 [expr.post], or in 5.2.5 [expr.pseudo] 
or 7.1.6.4 [dcl.spec.auto] which explicitly limits usage of auto.

> Why not allow that notion when declaring the destructor aswell? And
> why not also for the constructor?
>
>      struct A {
>          auto() { }
>          ~auto() { }
>      };
>

Because it looks like nonsense. It would be more expressive to allow 
such for decltype(*this), but alas it would be a breaking change because 
that refers to the enclosing class in a local class within a nonstatic 
member function.

Also, constructors and destructors cannot be declared using typedef 
names or other type-ids; this is already explicitly forbidden.

It would be nice to otherwise provide universal syntax for "the 
enclosing class."

-- 

--- 
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/.

.
