220 14508 <9020116.1vaR7e8TYO@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Range-based if
Date: Wed, 12 Nov 2014 13:36:51 -0800
Lines: 21
Approved: news@gmane.org
Message-ID: <9020116.1vaR7e8TYO@tjmaciei-mobl4>
References: <CADbh+eQCaTPArs7YBUg9mYwrnJ2Gu3SRAfqUbPiLscpyxV8JqQ@mail.gmail.com> <CADbh+eScmZMj4dcQv73re1dM0VNbw_PeHRc_FPWNONoKNKsiMg@mail.gmail.com> <70a52592-8f61-4fc2-855e-f65d73af9be8@isocpp.org>
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 1415828242 32500 80.91.229.3 (12 Nov 2014 21:37:22 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 12 Nov 2014 21:37:22 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBDFGR6RQKGQEGTEMA4A@isocpp.org Wed Nov 12 22:37:17 2014
Return-path: <std-proposals+bncBCB4TK757YBRBDFGR6RQKGQEGTEMA4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f71.google.com ([74.125.82.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBDFGR6RQKGQEGTEMA4A@isocpp.org>)
	id 1XofbI-0000eV-Td
	for gclcip-std-proposals@m.gmane.org; Wed, 12 Nov 2014 22:37:16 +0100
Original-Received: by mail-wg0-f71.google.com with SMTP id b13sf7197125wgh.6
        for <gclcip-std-proposals@m.gmane.org>; Wed, 12 Nov 2014 13:37:16 -0800 (PST)
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: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=R+U0nAuo8OUPCw7vy2DczsQj/UkAKLYKT4fxs90epdw=;
        b=mBdG7NYfYaRx8GRMIHaitENjz7zuQo+lJ4ZwH+gvT7CcttpVLSAh2wKmaJV+i8+Xuj
         Ri4SrRXcDOKX6RDrTDlF9NzctpKuex8IxFr2XtXKkgh6I8GWZRBgohaQqCb8DCKbh4YR
         kXV7U2qJNMm5vRswHPT67tPnT8Zf8xTfXjCav9TS0UfbrUUAHvIhF4cysvL5IgxcqKoS
         /KHm0BLOLDe2LRzO4GrnvEzDZSGXkcf42KaPPbpbV+KTkWUDDDLK6aHmHZGVP6qOREu0
         PeqlKoG3Smibmzw+6jwVl+w1GE8CTM3Z/Yn6wO4iLVOlOR+jxXDoTmPZzbYypsqSAv/z
         vo1w==
X-Gm-Message-State: ALoCoQnHgM8oi03CrxxQ2ShJR3EG+zeSgo41C4YLReiFaB8c7xgyGk7cVop2qlrkedExbmYufd+G
X-Received: by 10.112.147.131 with SMTP id tk3mr2184512lbb.2.1415828236522;
        Wed, 12 Nov 2014 13:37:16 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.181.13.18 with SMTP id eu18ls1479wid.6.canary; Wed, 12 Nov
 2014 13:37:15 -0800 (PST)
X-Received: by 10.194.185.68 with SMTP id fa4mr47767136wjc.83.1415828235751;
        Wed, 12 Nov 2014 13:37:15 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id jt3si29483735wid.19.2014.11.12.13.37.15
        for <std-proposals@isocpp.org>;
        Wed, 12 Nov 2014 13:37:15 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (jfdmzpr06-ext.jf.intel.com [134.134.137.75])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 895C311BDCE
	for <std-proposals@isocpp.org>; Wed, 12 Nov 2014 13:37:14 -0800 (PST)
User-Agent: KMail/4.14.2 (Linux/3.16.6-2-desktop; KDE/4.14.2; x86_64; ; )
In-Reply-To: <70a52592-8f61-4fc2-855e-f65d73af9be8@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=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: <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:14508
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14508>

On Wednesday 12 November 2014 11:33:29 Olaf van der Spek wrote:
> IMO it'd be nice if this was possible:
> if (auto& range = GetTheRange())

All you need is that range's type provide a conversion to bool that indicates 
whether it's empty or not.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
