220 5028 <CAOfiQqny-c6wrCr8wOMtDt4sGaGHBR=NaR9-qB91R2bX-QdOMA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Require that this should be always caputred by copy.
Date: Thu, 13 Jun 2013 13:58:56 -0700
Lines: 35
Approved: news@gmane.org
Message-ID: <CAOfiQqny-c6wrCr8wOMtDt4sGaGHBR=NaR9-qB91R2bX-QdOMA@mail.gmail.com>
References: <51bf2631-aed7-4433-b16d-15ee15e87f29@isocpp.org>
	<CAGg_6+N6v9re4xTwQSukyCXGDhs5FdSgFks54pTZP_8gq-hziQ@mail.gmail.com>
	<CAFk2RUbs4AvOhUKG9mEVeMyAsNPubghHazwx-7BE3HS=_s++ow@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
X-Trace: ger.gmane.org 1371157140 7889 80.91.229.3 (13 Jun 2013 20:59:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 13 Jun 2013 20:59:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBEPF5CGQKGQEE5HSJJA@isocpp.org Thu Jun 13 22:59:00 2013
Return-path: <std-proposals+bncBDVNBJG4YAIBBEPF5CGQKGQEE5HSJJA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f72.google.com ([209.85.213.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBEPF5CGQKGQEE5HSJJA@isocpp.org>)
	id 1UnEbi-0003jC-Rr
	for gclcip-std-proposals@m.gmane.org; Thu, 13 Jun 2013 22:58:58 +0200
Original-Received: by mail-yh0-f72.google.com with SMTP id z20sf6117995yhz.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 13 Jun 2013 13:58:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere:mime-version:sender:in-reply-to:references:date
         :message-id:subject:from:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=uM6qOd8B3Eqetxdjgo5DG/ar2X6fCgJUlP2BUNj4LZc=;
        b=aHfKtLpCKcNAbnoKx4GwXq25xrDZMZX3mvR+n0Mk11WLoKQHWb/VDW2cT7wEN1DqOH
         LrhI97w/VPGEiLh5y8ONDJQpg2A/e0uKBf+Pz1AO/ZQN0qZpIykmjf1mUyDgm6YTTR4M
         /7yt0hVkx5XQcnFMGyN6ZkdVbMcOfwjFATw22IyIJmicMty5Mfky4+0W7uhpMsg8d30o
         15l/c1bqjmpDECT7zwi3eY1HlBLTaqtAIy6dsU0zR1R/msFgKALIlHTLYGlYAToT41/E
         2roAtK5WUYLpp7m9+7Z+wtUg52v5aim/X8ymZI23A1gLiPYBGh/LbUmpXXBTYEJ7JU4I
         fQ1Q==
X-Received: by 10.224.205.138 with SMTP id fq10mr2303041qab.1.1371157137759;
        Thu, 13 Jun 2013 13:58:57 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.118.170 with SMTP id kn10ls2869110qeb.91.gmail; Thu, 13 Jun
 2013 13:58:56 -0700 (PDT)
X-Received: by 10.52.245.100 with SMTP id xn4mr959697vdc.46.1371157136625;
        Thu, 13 Jun 2013 13:58:56 -0700 (PDT)
Original-Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170])
        by mx.google.com with ESMTPS id xb6si11270733vdb.120.2013.06.13.13.58.56
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 13 Jun 2013 13:58:56 -0700 (PDT)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170;
Original-Received: by mail-vc0-f170.google.com with SMTP id hf12so7697610vcb.29
        for <std-proposals@isocpp.org>; Thu, 13 Jun 2013 13:58:56 -0700 (PDT)
X-Received: by 10.58.90.5 with SMTP id bs5mr1076655veb.60.1371157136286; Thu,
 13 Jun 2013 13:58:56 -0700 (PDT)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.58.206.110 with HTTP; Thu, 13 Jun 2013 13:58:56 -0700 (PDT)
In-Reply-To: <CAFk2RUbs4AvOhUKG9mEVeMyAsNPubghHazwx-7BE3HS=_s++ow@mail.gmail.com>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of metafoo@gmail.com designates 209.85.220.170 as permitted sender)
 smtp.mail=metafoo@gmail.com;       dkim=pass header.i=@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:5028
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5028>

On Thu, Jun 13, 2013 at 1:53 PM, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> On 13 June 2013 23:49, Nevin Liber <nevin@eviloverlord.com> wrote:
>> On 13 June 2013 15:16, <tomaszkam@gmail.com> wrote:
>>>
>>> Currently the standard (C++14 CD - NS3690) disallows explicit capture of
>>> this by reference the this seems to be allowed to be captured implicit by
>>> reference by the [&]. $5.1.2:
>>
>>
>> Is this something that can be handled editorially?
>>
>> Does it matter?  Is there a use case that can distinguish between
>> capturing this by reference and this by value?
>>
>
> And if there is such a use case, is it not covered by using an init-capture?
>
> Hmm. [&foo = this] doesn't work, we can't initialize a ref-to-nonconst from
> a prvalue, and this is a prvalue...

That seems like a good reason to disallow [&this]: we'd be binding a
reference to a prvalue. Even if that worked, what lifetime would the
temporary we created have?

-- 

--- 
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/.



.
