220 8607 <2875722.TjfBuHt6Pp@tjmaciei-mobl2> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: string_view::is_null()
Date: Wed, 15 Jan 2014 09:22:22 -0800
Lines: 45
Approved: news@gmane.org
Message-ID: <2875722.TjfBuHt6Pp@tjmaciei-mobl2>
References: <8045a4d2-721d-4725-8bb7-7a91b6f53ec8@isocpp.org> <CANh-dXkOyaq0U9MkYiiZeTTMcNVNXVG6vqqwBOCymXLHpV1VJg@mail.gmail.com> <1140684e-4619-4b14-9e0e-fdb30d830333@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1962733.DYyL6i9T4G"; micalg="pgp-sha1"; protocol="application/pgp-signature"
X-Trace: ger.gmane.org 1389806554 22590 80.91.229.3 (15 Jan 2014 17:22:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 15 Jan 2014 17:22:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBX4H3OLAKGQEUWAG7JQ@isocpp.org Wed Jan 15 18:22:42 2014
Return-path: <std-proposals+bncBCB4TK757YBRBX4H3OLAKGQEUWAG7JQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f198.google.com ([209.85.212.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBX4H3OLAKGQEUWAG7JQ@isocpp.org>)
	id 1W3UAq-0003WS-Ed
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Jan 2014 18:22:40 +0100
Original-Received: by mail-wi0-f198.google.com with SMTP id cc10sf3620223wib.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Jan 2014 09:22:40 -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=aVuGSrW47y62vCZsrkyzhhftl1Au98+0dJFA5KhWxGA=;
        b=OkOBv4p0RiqbPVDAjsKkW2Yp+6jOuHG6xxhlWphy1SFIaVKTXKdTWajtAxczH+j52A
         i+vuGnen/CHFB3HeJSwQIefmLpgnorOfzMEatEbgXPaTWpSsGJY3ZFyk/aUMpJKKLYqa
         VBFCjgBwRvIDSCQRCQbMChnq4BISdcT7YTFJvlItcX9xM9OeVjpQGPlk4R6pyde+BQjI
         9rA+2sLXqlILVwE75WHfB9qtrgZ7RYAFnT8IAFTX//68PpgMvWREfX9u2Z+V49C/mwmA
         kAmosJ1/vD4Uk/eFjxAY//FsMLtpniTNN2neam92S4EOdAlNEmANu3/TZQrlZGdLs2nQ
         GCIQ==
X-Gm-Message-State: ALoCoQm4AKMjMivZnm22wq1tgcyWLgZVhH5XKEZorNtD044UyZhWcx/B/rWYA6AjFv6V9Wjg5/Uq
X-Received: by 10.180.108.102 with SMTP id hj6mr1561953wib.7.1389806559948;
        Wed, 15 Jan 2014 09:22:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.12.111 with SMTP id x15ls895625wib.5.canary; Wed, 15 Jan
 2014 09:22:38 -0800 (PST)
X-Received: by 10.181.13.11 with SMTP id eu11mr3538779wid.30.1389806558950;
        Wed, 15 Jan 2014 09:22:38 -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 r1si3629878wjy.130.2014.01.15.09.22.37
        for <std-proposals@isocpp.org>;
        Wed, 15 Jan 2014 09:22:37 -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-mobl2.localnet (unknown [IPv6:2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
	by gondolin.macieira.info (Postfix) with ESMTPSA id AB7AB11B79D
	for <std-proposals@isocpp.org>; Wed, 15 Jan 2014 09:22:36 -0800 (PST)
User-Agent: KMail/4.12 pre (Linux/3.9.10-100+i915fix.fc17.x86_64; KDE/4.11.60; x86_64; git-8054221; 2013-08-01)
In-Reply-To: <1140684e-4619-4b14-9e0e-fdb30d830333@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: <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:8607
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8607>


--nextPart1962733.DYyL6i9T4G
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On quarta-feira, 15 de janeiro de 2014 04:20:11, Olaf van der Spek wrote:
> In some cases being able to distinguish between null and empty is required. 
> string_view could easily support this distinction, what's the reason it
> should be discouraged?

Just FYI

Once std::string_view came into focus, I looked into QStringRef to see if it 
could be updated for Qt 6 and support the same semantics. Whereas 
std::string_view consists of two iterators (begin and end), QStringRef 
actually contains a pointer to the original QString, plus an offset and length. 
That's what I tried to change.

There were two reasons why that did work: one was specifically the isNull() 
method, since the "nullness" is a property of the QString which a pair of 
iterators cannot represent. That is, a null QString and an empty-but-null 
QString can have the same data pointer.

-- 
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

--nextPart1962733.DYyL6i9T4G
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iD8DBQBS1sPOM/XwBW70U1gRAv0VAKCd8v6NMTx+hVdW7QSlISDlqaudZwCdHkFM
UTaHd2MHUF0j2IVyGhA7Vtc=
=aUV4
-----END PGP SIGNATURE-----

--nextPart1962733.DYyL6i9T4G--


.
