220 14525 <m4327s$4kg$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mw_triad@users.sourceforge.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Range-based if
Date: Thu, 13 Nov 2014 14:53:31 -0500
Lines: 36
Approved: news@gmane.org
Message-ID: <m4327s$4kg$1@ger.gmane.org>
References: <CADbh+eQCaTPArs7YBUg9mYwrnJ2Gu3SRAfqUbPiLscpyxV8JqQ@mail.gmail.com>	<m3tvcu$9ia$1@ger.gmane.org>	<CADbh+eScmZMj4dcQv73re1dM0VNbw_PeHRc_FPWNONoKNKsiMg@mail.gmail.com>	<c1a0a498-adca-44c7-a9fc-67a979967e6a@isocpp.org>	<CADbh+eS+nGHpqRBUCbUFGX3+fXWiiCD0C=nvjpAUZDm_=+N2-g@mail.gmail.com>	<m42ltp$tdn$1@ger.gmane.org> <CADbh+eTp9VGKm1Ux3fGf5S_gRO2XmDw-PD2uoLzJ8qzne1Be-Q@mail.gmail.com>
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 1415908439 5397 80.91.229.3 (13 Nov 2014 19:53:59 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 13 Nov 2014 19:53:59 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCO5FYHBU4ERBS4YSSRQKGQEL3JCYAA@isocpp.org Thu Nov 13 20:53:49 2014
Return-path: <std-proposals+bncBCO5FYHBU4ERBS4YSSRQKGQEL3JCYAA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ee0-f71.google.com ([74.125.83.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCO5FYHBU4ERBS4YSSRQKGQEL3JCYAA@isocpp.org>)
	id 1Xp0Sj-00053u-30
	for gclcip-std-proposals@m.gmane.org; Thu, 13 Nov 2014 20:53:49 +0100
Original-Received: by mail-ee0-f71.google.com with SMTP id e51sf9861317eek.10
        for <gclcip-std-proposals@m.gmane.org>; Thu, 13 Nov 2014 11:53:48 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent: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=T2HSuGfckmBwDW3pkX18ITifA8umvMzyi7G8iWZN7wk=;
        b=llvQ9sxDSFaWqgwcoFvq4rpMfx/+6srCglUtIvbDYSbm7+EiZkMIcdHLcTRtlv/or/
         qpWEtKCpYranQ6g665IKBjhHI1p1K9apqbVnH7A/xSkOZFGyE/N2HqK4z3H5ItRWq9KV
         SWl4non80w+Bn//JqCozguA0L39xJlGyE/bCazbDtMAshvv77aowwe/sSfsIGD3+znDe
         C7kd610YG85Sf2xfHU6VwegfqcNY9z2WKdSKKr3C5zahptXfmJG73mNcokH80rImQHN1
         MyS8bxrtLjz4B0K8I/EooQXLgtZnjuJsfqwJwWPN+IeNVqM8Qgc6RfiwMgsXHK2kzMYk
         ZS9g==
X-Gm-Message-State: ALoCoQkbXEBRUQ+JKDDjqpT3x3fYTU/9XcF86zB5P2vuCXgceUHAJoS0EucKJHaTNQowzu59uxDc
X-Received: by 10.112.55.10 with SMTP id n10mr908140lbp.14.1415908428804;
        Thu, 13 Nov 2014 11:53:48 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.21.200 with SMTP id x8ls774608lae.76.gmail; Thu, 13 Nov
 2014 11:53:47 -0800 (PST)
X-Received: by 10.152.43.80 with SMTP id u16mr4258736lal.53.1415908427116;
        Thu, 13 Nov 2014 11:53:47 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id wx5si39393594lbb.123.2014.11.13.11.53.46
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Thu, 13 Nov 2014 11:53:46 -0800 (PST)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1Xp0Se-00052N-L5
	for std-proposals@isocpp.org; Thu, 13 Nov 2014 20:53:44 +0100
Original-Received: from cpe-67-240-43-113.nycap.res.rr.com ([67.240.43.113])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Thu, 13 Nov 2014 20:53:44 +0100
Original-Received: from mw_triad by cpe-67-240-43-113.nycap.res.rr.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Thu, 13 Nov 2014 20:53:44 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 27
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: cpe-67-240-43-113.nycap.res.rr.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
In-Reply-To: <CADbh+eTp9VGKm1Ux3fGf5S_gRO2XmDw-PD2uoLzJ8qzne1Be-Q@mail.gmail.com>
X-Original-Sender: mw_triad@users.sourceforge.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.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:14525
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14525>

On 2014-11-13 12:33, Brent Friedman wrote:
> I believe I was misinterpreting your intent. I had interpreted &begin() as
> a *begin() typo, not a &*begin() typo.

Ah... yeah, that could cause our confusion :-).

> If the intent is to return pointer-to-dereferenced-value, then that
> creates a separate issue. If *begin() returns say int (rather than
> int&) then that would return pointer-to-temporary-on-the-stack.

Right, that would be what I was getting at ("might not be possible in
all cases") in the previous message.

To be fair, I actually somewhat like your idea (I might even use it in
my own code if it was available; I have that "itching sensation" that
I've written code before where I could have used it), but I've seen how
language changes generally have a very high bar to pass. Unfortunately,
convenient or not, my impression is that this doesn't have a very good
chance of being accepted.

The bar tends to be lower where a library solution exists (and of
course, you can write and use the library solution yourself), which is
partly why I was exploring that. (For that matter, maybe your use
doesn't run afoul of the above issue...)

-- 
Matthew

-- 

--- 
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/.

.
