220 8729 <CAGg_6+OHw8jAO_m0Sj1GxkiB__mxPXfMDVh7tEiZsparxqi1HA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: string_view::is_null()
Date: Mon, 20 Jan 2014 00:25:58 -0600
Lines: 78
Approved: news@gmane.org
Message-ID: <CAGg_6+OHw8jAO_m0Sj1GxkiB__mxPXfMDVh7tEiZsparxqi1HA@mail.gmail.com>
References: <CAGNvRgDH=X2h4K_u3zOu7gUNuQbAcNHGNh=HfCRO9qG1mmiG1w@mail.gmail.com>
 <CANh-dXnytwWwS7E_BGA-xK8E-zw788TJKzM=HJdC-9JbF7+gTQ@mail.gmail.com>
 <104254A6-C69A-4571-8455-89D7E466D493@gmail.com> <CANh-dXngzdnwZZnLRxd=AXQcqLaQky9Cpdw6pkbH8tFqRyZavw@mail.gmail.com>
 <6a95bf9c-55c9-4ae2-966f-d1b1f4df6a37@isocpp.org> <52D9E336.1060801@knejp.de>
 <1B534FD7-B385-4A7E-A718-3C73F0AB61DC@gmail.com> <11f13f8f-1270-427c-8942-94027a181ff4@isocpp.org>
 <20140119174431.GA16875@faust.lysator.liu.se> <CAPOJ94Nt8tinr8hGeR-=rWZS0a529kY38NU-yo6BYM6kVo7czg@mail.gmail.com>
 <20140119192238.GA19497@faust.lysator.liu.se> <60842af6-5ec4-4364-b2d5-a0be9d578bd6@isocpp.org>
 <6c82c4ae-c144-443a-81b2-ea1a6b645601@isocpp.org> <CAGg_6+NYK0pndHN1sUk9=Lzz2gda_c5Yb1R_MXHXEPudwM5TmA@mail.gmail.com>
 <CANh-dXk8xb3aWcSr7qG75hjSNAu5hQR0EopiELSTdDLF-OjXuw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d043c7de66b9a3f04f060f977
X-Trace: ger.gmane.org 1390199192 25887 80.91.229.3 (20 Jan 2014 06:26:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 20 Jan 2014 06:26:32 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBBH4D6OLAKGQEWMLYV4I@isocpp.org Mon Jan 20 07:26:40 2014
Return-path: <std-proposals+bncBCE35H5S6IDBBH4D6OLAKGQEWMLYV4I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCE35H5S6IDBBH4D6OLAKGQEWMLYV4I@isocpp.org>)
	id 1W58Jk-0001pW-AY
	for gclcip-std-proposals@m.gmane.org; Mon, 20 Jan 2014 07:26:40 +0100
Original-Received: by mail-wi0-f200.google.com with SMTP id ex4sf5723526wid.7
        for <gclcip-std-proposals@m.gmane.org>; Sun, 19 Jan 2014 22:26:39 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject: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=BgrSpzljLOP5fq9M7pYkIEIW2KUoe+Rm1tGvmHw5OA0=;
        b=XdGnwxMEmg/NVHtSZjWeBJPj57IHBAyOMk29sURglcG0eNVA3tk2NgNmuRdHnRO2vd
         qfCqyyC46H89z7ezdguh9rmVxrlny+13RAR1xRMTTHM2blSBxgg9eTCcrHqNj6BUAsan
         hSNTx6ZIHiy5f2zMd/dAthP0ktTeoC+z3PaezwnTk4pxViQvcjA+HsJUKopW3LORPoVr
         M3da3FuITXaUEhqmYt0gYPuXpOcbRkrdTeAd1rr0p08bBWuwKeaNnwDkw8/3GuG5y7mC
         LBmi5GpaF3LvnAX465EZyq1UxRSecDicSExWQasoZM57f4cH/8nY6ozeJJC/l+ilfWac
         DQyA==
X-Gm-Message-State: ALoCoQkGr/BsSl8mWt8lrykHrErY1GCY0cOorDnr5WRK0fS/rX7Ne7vnow7ofLV+E3sA2eJuiu8e
X-Received: by 10.180.228.166 with SMTP id sj6mr5714162wic.2.1390199199774;
        Sun, 19 Jan 2014 22:26:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.181.12.101 with SMTP id ep5ls406141wid.40.gmail; Sun, 19 Jan
 2014 22:26:39 -0800 (PST)
X-Received: by 10.180.76.42 with SMTP id h10mr8544049wiw.46.1390199199160;
        Sun, 19 Jan 2014 22:26:39 -0800 (PST)
Original-Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [2a00:1450:400c:c03::22f])
        by mx.google.com with ESMTPS id em6si156626wib.36.2014.01.19.22.26.39
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 19 Jan 2014 22:26:39 -0800 (PST)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2a00:1450:400c:c03::22f as permitted sender) client-ip=2a00:1450:400c:c03::22f;
Original-Received: by mail-we0-f175.google.com with SMTP id p61so6436332wes.6
        for <std-proposals@isocpp.org>; Sun, 19 Jan 2014 22:26:39 -0800 (PST)
X-Received: by 10.181.13.11 with SMTP id eu11mr8342052wid.30.1390199198946;
 Sun, 19 Jan 2014 22:26:38 -0800 (PST)
Original-Sender: nliber@gmail.com
Original-Received: by 10.194.121.163 with HTTP; Sun, 19 Jan 2014 22:25:58 -0800 (PST)
In-Reply-To: <CANh-dXk8xb3aWcSr7qG75hjSNAu5hQR0EopiELSTdDLF-OjXuw@mail.gmail.com>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of nliber@gmail.com designates 2a00:1450:400c:c03::22f as permitted
 sender) smtp.mail=nliber@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:8729
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8729>

--f46d043c7de66b9a3f04f060f977
Content-Type: text/plain; charset=ISO-8859-1

On 20 January 2014 00:12, Jeffrey Yasskin <jyasskin@google.com> wrote:

> > My personal preference for all this is that string_view(nullptr, 0) be
> > allowed, and it is a Quality of Implementation issue whether or not
> > sv.data() can ever return a nullptr; i.e., it would be allowed to return
> any
> > legal pointer it wants for an empty string_view.
>
> That's interesting. It's easier to both specify and implement to just
> say that string_view(x, y).data()==x and string_view(x, y).size()==y,
> assuming [x, x+y) is a valid range. Why would you special-case data()
> to return arbitrary things when y==0?
>

A debugging implementation may want to ensure that developers aren't
dependent on "knowing" that a nullptr was passed in.
-- 
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

-- 

--- 
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/.

--f46d043c7de66b9a3f04f060f977
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 20 January 2014 00:12, Jeffrey Yasskin <span dir=3D"ltr=
">&lt;<a href=3D"mailto:jyasskin@google.com" target=3D"_blank">jyasskin@goo=
gle.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"g=
mail_quote">

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">&gt; My personal preferenc=
e for all this is that string_view(nullptr, 0) be<br>
&gt; allowed, and it is a Quality of Implementation issue whether or not<br=
>
&gt; sv.data() can ever return a nullptr; i.e., it would be allowed to retu=
rn any<br>
&gt; legal pointer it wants for an empty string_view.<br>
<br>
</div>That&#39;s interesting. It&#39;s easier to both specify and implement=
 to just<br>
say that string_view(x, y).data()=3D=3Dx and string_view(x, y).size()=3D=3D=
y,<br>
assuming [x, x+y) is a valid range. Why would you special-case data()<br>
to return arbitrary things when y=3D=3D0?<br></blockquote><div><br></div><d=
iv>A debugging implementation may want to ensure that developers aren&#39;t=
 dependent on &quot;knowing&quot; that a nullptr was passed in.</div></div>

-- <br>=A0Nevin &quot;:-)&quot; Liber=A0 &lt;mailto:<a href=3D"mailto:nevin=
@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=A0 (847=
) 691-1404
</div></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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 />

--f46d043c7de66b9a3f04f060f977--

.
