220 33845 <ef0ef4f3-b2bc-4867-9cde-4d3b15c97d1e@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: string_view for fstream::open()
Date: Fri, 11 Aug 2017 13:54:59 -0700 (PDT)
Lines: 74
Approved: news@gmane.org
Message-ID: <ef0ef4f3-b2bc-4867-9cde-4d3b15c97d1e@isocpp.org>
References: <cb7b55ab-7113-4d99-949b-8568627d0b7f@isocpp.org> <3456831.gsseCm4DuK@tjmaciei-mobl1> <6240d6af-a518-4788-a56f-b7d0c8976dc4@isocpp.org>
 <23479188.ocqGNj8Gyb@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2469_876993217.1502484899621"
X-Trace: blaine.gmane.org 1502484902 20813 195.159.176.226 (11 Aug 2017 20:55:02 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 11 Aug 2017 20:55:02 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBJFTXDGAKGQEUBOP6PY@isocpp.org Fri Aug 11 22:54:58 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBJFTXDGAKGQEUBOP6PY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f197.google.com ([209.85.192.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBJFTXDGAKGQEUBOP6PY@isocpp.org>)
	id 1dgGxL-000521-Ig
	for gclcip-std-proposals@m.gmane.org; Fri, 11 Aug 2017 22:54:55 +0200
Original-Received: by mail-pf0-f197.google.com with SMTP id p20sf48955347pfj.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 11 Aug 2017 13:55:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        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;
        bh=Z+cKIevy7yphXRoUHxcnd1LUiJgdTjOnDJeXKwe6tfA=;
        b=hOlqr0FGY3UwsMHc0JR5t62Kp9uTj2fYMueh3LFwrAlYFCGqx+4XQ/JIzwgcgoDW0j
         KK3htJVyn5GLnJpTyd9NebJdzr22WUNIUts3UDxnCul6UZRT4v/3LB6C9Nw5m8WHpEYJ
         vFtMxEyYy77xZU8bOlmV/keD11Zr229bql4LO6gGDXHCGfdTdVf0Fm9yMEvJOYMalLbf
         wQgH5z5UVnasKGS3Z90mxTOudcrN4EjVmll/w71ewiF/OWeUOjAvPvtfMSRvKltB3n1i
         uf5A8xZVp3n2y55LH9weylwzT9img+MCLgekc3D9YYT7wpqPVCb/OXEnMp83Q2RaYhUD
         TUcg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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;
        bh=Z+cKIevy7yphXRoUHxcnd1LUiJgdTjOnDJeXKwe6tfA=;
        b=TfBltz6bKeRQMnkM8g81a0+5W+bYgLIdfBwph1WVluP6UPoUGl+CLpGZCIh14WiPPU
         PrxBMWKU+tde7VOJPld2rit1DOiAoedB9NI6tUDzFy6rJV/My37X60gGdkAf6ocKJa9M
         XXgQhLOQCLYPQ/mYNW5h46Jl9x6zE6H8w7NtNBvAaBQlXETPziEXV8RQtliNNa7TYQPc
         kc4sMBNLMTgdUsdOQwH7lwnaGlAb3A+4Hx2yUucn3quakTZPnQrPzLsv1X22GaZb8IdQ
         wea41cstMeLVoz5DlezHuZmnPs2b83QZiPkyxT8QNqxHX0x2l0bxbN2iglCdDtEIz3n4
         8vKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=Z+cKIevy7yphXRoUHxcnd1LUiJgdTjOnDJeXKwe6tfA=;
        b=n9PQ44J2kmKolao37uynU7lrIDEeqO+ikZTYAUNxRfkgD7cARZ1tIE5HPrENVjoDuB
         Zo6aVLkp2H+P69yxMNcZKp1S+UZUowx05zm8bxOOyQ8mx8bDvtAA26tPxRAN4qTb5/X9
         QVUnSkmm8xU1m2Ea/AoT27hoA7kkZtCw0ZV9pXGm4tCjwmkZHK0OY3qcsA2n6z74SZ+S
         BeycFNci9f2kI+IAUqzSBJKhNzMAyUS0son8aV+zsZ7k0cs5K3ywRqmc7yBFvkYnaGLH
         PN6fWE37Sq83uo6TzMWq2Gqfuh2yVFJWWzm9CNuAiCk+Il8VvRDlAJLFk78epPgTb3Me
         jYYA==
X-Gm-Message-State: AHYfb5hocfTrJWzFa1S9keyxXQ8RVq/hfQUFnLO3gGzkKD2XT2ajrlA3
	Izezru+TEqN6EWBg
X-Received: by 10.101.69.138 with SMTP id o10mr11238499pgq.63.1502484901584;
        Fri, 11 Aug 2017 13:55:01 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.184.70 with SMTP id m67ls323140ite.18.gmail; Fri, 11 Aug
 2017 13:55:00 -0700 (PDT)
X-Received: by 10.31.99.198 with SMTP id x189mr93042vkb.24.1502484900263;
        Fri, 11 Aug 2017 13:55:00 -0700 (PDT)
In-Reply-To: <23479188.ocqGNj8Gyb@tjmaciei-mobl1>
X-Original-Sender: jmckesson@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33845
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33845>

------=_Part_2469_876993217.1502484899621
Content-Type: multipart/alternative; 
	boundary="----=_Part_2470_501504542.1502484899621"

------=_Part_2470_501504542.1502484899621
Content-Type: text/plain; charset="UTF-8"

On Friday, August 11, 2017 at 4:36:36 PM UTC-4, Thiago Macieira wrote:
>
> On sexta-feira, 11 de agosto de 2017 10:01:28 PDT Nicol Bolas wrote: 
> > `cstring_view` is just a `const char*` with a nice wrapper. It is just a 
> > pointer, which means `size()` is always O(n). But this also means that 
> > sticking a literal in it costs nothing. But if you try to use it with 
> > begin/end iterator pairs, you provoke an O(n) operation. 
>
> Actually, no. The end iterator can be a sentinel, such that the call to 
> cstring_view::end() is O(1). 
>

A fact I mentioned later in that post, but one that relies on Ranges TS and 
its range algorithms. In a pre-Ranges TS world, that's not an acceptable 
implementation, since all of our current algorithms are based on iterator 
pairs, not iterator/sentinels.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/ef0ef4f3-b2bc-4867-9cde-4d3b15c97d1e%40isocpp.org.

------=_Part_2470_501504542.1502484899621
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, August 11, 2017 at 4:36:36 PM UTC-4, Thiago Mac=
ieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On sexta-feira, 11=
 de agosto de 2017 10:01:28 PDT Nicol Bolas wrote:
<br>&gt; `cstring_view` is just a `const char*` with a nice wrapper. It is =
just a
<br>&gt; pointer, which means `size()` is always O(n). But this also means =
that
<br>&gt; sticking a literal in it costs nothing. But if you try to use it w=
ith
<br>&gt; begin/end iterator pairs, you provoke an O(n) operation.
<br>
<br>Actually, no. The end iterator can be a sentinel, such that the call to=
=20
<br>cstring_view::end() is O(1).
<br></blockquote><div><br>A fact I mentioned later in that post, but one th=
at relies on Ranges TS and its range algorithms. In a pre-Ranges TS world, =
that&#39;s not an acceptable implementation, since all of our current algor=
ithms are based on iterator pairs, not iterator/sentinels.</div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ef0ef4f3-b2bc-4867-9cde-4d3b15c97d1e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ef0ef4f3-b2bc-4867-9cde-4d3b15c97d1e=
%40isocpp.org</a>.<br />

------=_Part_2470_501504542.1502484899621--

------=_Part_2469_876993217.1502484899621--

.
