220 6989 <CAGsORuAj=aPfp9CuaLXq_18XPsQ_cHwF3dYSyEtdhuopf8yNeA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Unnamed LValues
Date: Fri, 4 Oct 2013 22:06:34 -0400
Lines: 40
Approved: news@gmane.org
Message-ID: <CAGsORuAj=aPfp9CuaLXq_18XPsQ_cHwF3dYSyEtdhuopf8yNeA@mail.gmail.com>
References: <CADbh+eSOH540anYnezFkm4_wK+MCtMh-01XNzAcMQMebdCPgRQ@mail.gmail.com>	<CAOfiQqnr1C=78ARnZEvdNn=Pevz6nW1BhBz8tcFNcf9phJWEVg@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 1380938797 15267 80.91.229.3 (5 Oct 2013 02:06:37 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 5 Oct 2013 02:06:37 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBLPIXWJAKGQEN3FUT3Q@isocpp.org Sat Oct 05 04:06:41 2013
Return-path: <std-proposals+bncBCSKRWMD4EHBBLPIXWJAKGQEN3FUT3Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f69.google.com ([209.85.216.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBLPIXWJAKGQEN3FUT3Q@isocpp.org>)
	id 1VSHGR-0002ir-9F
	for gclcip-std-proposals@m.gmane.org; Sat, 05 Oct 2013 04:06:39 +0200
Original-Received: by mail-qa0-f69.google.com with SMTP id cm18sf4164177qab.4
        for <gclcip-std-proposals@m.gmane.org>; Fri, 04 Oct 2013 19:06:38 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :sender: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=dv3IbUs8g3/HdDUyOjfwz3OBTEitwEx7AuMJiVEJbbw=;
        b=dSnZ/OWgUMQaowUkx0hhw9nXbrSJOoYbvUdA6ez+L1aWSWdlkmmHcSRWvpyCDckYID
         oOFmDn8c21l1hHsdiaZEUkVo66EZjOUYDaIynW2AjCP5O1KATL9SZN0j7By93OqSfic/
         +YU15nEssVPGQup4UQtqI8nR1C/ytMTwBSTa69oEKp6GkqhDwJnknKEdJw66KEBMZbud
         FviUS9hX0q06QS3PWX0q+G6YY1cD7gfvD7Nd7bPdSyh6oCUkq04ok42/WOfUQsBjtZzc
         ujq2Gxt6NvHowxYr8ZdUyNBoESbBhV0/Z4SjdCFCg+XX3JU9BkCLLy46wHoEGUnqYqZU
         QvLQ==
X-Received: by 10.236.116.135 with SMTP id g7mr16448247yhh.53.1380938798357;
        Fri, 04 Oct 2013 19:06:38 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.11.179 with SMTP id r19ls1514316qeb.76.gmail; Fri, 04 Oct
 2013 19:06:37 -0700 (PDT)
X-Received: by 10.236.54.232 with SMTP id i68mr12668503yhc.0.1380938797773;
        Fri, 04 Oct 2013 19:06:37 -0700 (PDT)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTP id u42si6325115yhc.272.1969.12.31.16.00.00;
        Fri, 04 Oct 2013 19:06:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com
 [209.85.212.44]) by mxa.mailgun.org with ESMTP id 524f742b.96641b0-in1;
 Sat, 05 Oct 2013 02:06:35 -0000 (UTC)
Original-Received: by mail-vb0-f44.google.com with SMTP id e13so2711881vbg.3 for
 <std-proposals@isocpp.org>; Fri, 04 Oct 2013 19:06:34 -0700 (PDT)
X-Received: by 10.58.117.71 with SMTP id kc7mr14981971veb.16.1380938794932;
 Fri, 04 Oct 2013 19:06:34 -0700 (PDT)
Original-Received: by 10.220.250.6 with HTTP; Fri, 4 Oct 2013 19:06:34 -0700 (PDT)
In-Reply-To: <CAOfiQqnr1C=78ARnZEvdNn=Pevz6nW1BhBz8tcFNcf9phJWEVg@mail.gmail.com>
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Sender: zy@miator.net
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates
 184.173.153.196 as permitted sender) smtp.mail=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net;
       dkim=pass header.i=@miator.net
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:6989
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6989>

On Fri, Oct 4, 2013 at 9:33 PM, Richard Smith <richard@metafoo.co.uk> wrote:
>   /*template<typename Mutex> std::lock_guard<Mutex> locked(Mutex &);*/
>
>   locked(my_mutex) {
>   }

This reminds me Python's with statement.  In C++, it may
look like:

  with (expr) {
    // ...
  }

  If you need a name,

  with (auto name = expr) {
  }

And I can further imagine that this requires a
_compound-statement_, so that we can have

  struct A {
    A() with (expr) {
    }
  };

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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/.

.
