220 14519 <92a159e9-a182-4d21-ba7d-405f1f4e9cdf@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Benjamin Lindley <benjameslindley@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Range-based if
Date: Wed, 12 Nov 2014 18:53:24 -0800 (PST)
Lines: 93
Approved: news@gmane.org
Message-ID: <92a159e9-a182-4d21-ba7d-405f1f4e9cdf@isocpp.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>
 <F6326656-B6D4-468E-BD55-FF2F1A987EEE@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_930_1062945902.1415847204756"
X-Trace: ger.gmane.org 1415847214 30237 80.91.229.3 (13 Nov 2014 02:53:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 13 Nov 2014 02:53:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDI7THWOWMDRBJN2SCRQKGQEGDGOD6Y@isocpp.org Thu Nov 13 03:53:28 2014
Return-path: <std-proposals+bncBDI7THWOWMDRBJN2SCRQKGQEGDGOD6Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f71.google.com ([209.85.218.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDI7THWOWMDRBJN2SCRQKGQEGDGOD6Y@isocpp.org>)
	id 1XokXH-0001qA-0t
	for gclcip-std-proposals@m.gmane.org; Thu, 13 Nov 2014 03:53:27 +0100
Original-Received: by mail-oi0-f71.google.com with SMTP id i138sf2720507oig.6
        for <gclcip-std-proposals@m.gmane.org>; Wed, 12 Nov 2014 18:53:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=ViEGsuIM9SzhNoECNVARiBOORBe/lbPuiaNNGjJdXcE=;
        b=u4uEgkQI6cE8p5c1wyQOBZZgzwt5A8JDXMFsveVD6HlI9SXMI/fj2wxpArFGtXl/vA
         Cod32HFsg1l+hS4UDy4FuHSYGu0gnird6WCXdvu0XQV81mgsmvxGSTsCKzfcshKON80N
         frx9N1uy6ud/4qI5bgPe06rt9668sOrFH6KqRO7KZr6Dch/WrlA46riQrwJroAE0kL+i
         Ka2THZZWAtAiyIxwT7ydEoJNsEMuUgajsoeZFXZ0Yt5j7a6Ms2UeEfO0o8z1jnXL7RAX
         GghG6XwjjY2r5cMQ4waMYZ5wcraWbwtfKTsNBy/MGkW9LwRUuXaDuNoSl159Woj0Qppf
         YbHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=ViEGsuIM9SzhNoECNVARiBOORBe/lbPuiaNNGjJdXcE=;
        b=fiMpGQ/+nIjk5EsQU2NnecxDK2eCGxmgvUeEPvG28jmZ+k+xN/uFDoQngVX8vK6qWh
         c8pP7vTcwe7DKG5llo4TeAq4Yf1tTFKEbupB6XVdBTnaD3Gx163cWVj9n5E0HT3eMYZu
         hTyOOuclC+8YFkxsMvQT484YIYUw21oHipWeELP9FE3JNQ4uqKUf6dqvFxHbJIsfN7N4
         riK/r98GpkDL+Ij9i7/il0od/k1rv+gqAniXurzvRTf6a31vXRYIjr7Q6u0SDqurn3yM
         pG9XApqo/If4H8NtUooVY0ik3WnUEdHETtq/2D6iymdxZYQe0ozooqswALCcBws4VSWI
         gGsw==
X-Gm-Message-State: ALoCoQltnH9wXhEK284S8ObkyJCZYzy6SCHd7QiO9TZzAvBykYy0P+5v8gdbFbZPBaIZwtk6HDQz
X-Received: by 10.42.198.140 with SMTP id eo12mr44784634icb.20.1415847206239;
        Wed, 12 Nov 2014 18:53:26 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.55.69 with SMTP id q5ls1225224obp.45.gmail; Wed, 12 Nov
 2014 18:53:25 -0800 (PST)
X-Received: by 10.182.94.205 with SMTP id de13mr503obb.23.1415847205279;
        Wed, 12 Nov 2014 18:53:25 -0800 (PST)
In-Reply-To: <F6326656-B6D4-468E-BD55-FF2F1A987EEE@gmail.com>
X-Original-Sender: benjameslindley@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: <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:14519
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14519>

------=_Part_930_1062945902.1415847204756
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Wednesday, November 12, 2014 8:31:35 PM UTC-6, David Krauss wrote:
>
>
> On 2014=E2=80=9311=E2=80=9313, at 9:43 AM, Benjamin Lindley <benjame...@g=
mail.com=20
> <javascript:>> wrote:
>
>
>
> On Tuesday, November 11, 2014 8:39:34 PM UTC-6, Brent Friedman wrote:
>>
>> > auto first_or_null(auto range) -> decltype(&range.begin())
>>
>> This assumes pointers, which while addressing some use cases it isn't=20
>> sufficient for the general case.
>>
>>
> What case does it not handle? And what exactly do you mean by "This=20
> assumes pointers"? It doesn't assume that the iterators are pointers, if=
=20
> that's what you mean.=20
>
>
> It doesn=E2=80=99t cover smart pointers.
>

Smart pointers aren't ranges that have a first element, so I'm not sure why=
=20
you would expect them to be covered by this. The proposal you refer to=20
solves a completely different problem, afaict.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_930_1062945902.1415847204756
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, November 12, 2014 8:31:35 PM UTC-6, =
David Krauss wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div style=
=3D"word-wrap:break-word"><br><div><div>On 2014=E2=80=9311=E2=80=9313, at 9=
:43 AM, Benjamin Lindley &lt;<a href=3D"javascript:" target=3D"_blank" gdf-=
obfuscated-mailto=3D"gckUZmEC924J" onmousedown=3D"this.href=3D'javascript:'=
;return true;" onclick=3D"this.href=3D'javascript:';return true;">benjame..=
..@gmail.com</a>&gt; wrote:</div><br><blockquote type=3D"cite"><div dir=3D"l=
tr"><br><br>On Tuesday, November 11, 2014 8:39:34 PM UTC-6, Brent Friedman =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">&gt;<span st=
yle=3D"font-family:arial,sans-serif;font-size:13px">&nbsp;auto first_or_nul=
l(auto range) -&gt; decltype(&amp;range.begin())</span><div><br></div><div>=
This assumes pointers, which while addressing some use cases it isn't suffi=
cient for the general case.</div><div><br></div></div></blockquote><div><br=
>What case does it not handle? And what exactly do you mean by "This assume=
s pointers"? It doesn't assume that the iterators are pointers, if that's w=
hat you mean. <br></div></div></blockquote><div><br></div><div>It doesn=E2=
=80=99t cover smart pointers.</div></div></div></blockquote><div><br>Smart =
pointers aren't ranges that have a first element, so I'm not sure why you w=
ould expect them to be covered by this. The proposal you refer to solves a =
completely different problem, afaict.<br></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_930_1062945902.1415847204756--

.
