220 33188 <5666b7ac-b35e-4e9c-90ce-43a246b95f1a@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: [idea for proposal] Adding std::shift to <algorithm>
Date: Wed, 12 Jul 2017 11:46:51 -0700 (PDT)
Lines: 75
Approved: news@gmane.org
Message-ID: <5666b7ac-b35e-4e9c-90ce-43a246b95f1a@isocpp.org>
References: <bd1a5d3b-ccc1-44ab-91cc-a4d7195c9dc3@isocpp.org>
 <a33d3e68-f629-4048-8716-418b5778d471@isocpp.org>
 <48819b6e-f08d-46b8-bc88-08d3640509a1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_182_798985797.1499885211734"
X-Trace: blaine.gmane.org 1499885266 28309 195.159.176.226 (12 Jul 2017 18:47:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 12 Jul 2017 18:47:46 +0000 (UTC)
Cc: dan@soundradix.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBHG5THFQKGQE536FBHQ@isocpp.org Wed Jul 12 20:47:42 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBHG5THFQKGQE536FBHQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f200.google.com ([209.85.213.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBHG5THFQKGQE536FBHQ@isocpp.org>)
	id 1dVMfi-00070j-VA
	for gclcip-std-proposals@m.gmane.org; Wed, 12 Jul 2017 20:47:39 +0200
Original-Received: by mail-yb0-f200.google.com with SMTP id o20sf25035427yba.9
        for <gclcip-std-proposals@m.gmane.org>; Wed, 12 Jul 2017 11:47:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc: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=2v2Z0x58UXlCE27zaTeQAnOnd7AAV0IrFS2O1MbzzyY=;
        b=g+ASdLqClja1rjxiy+cXypzuNGOkzWVsdY4lSXhMZROfb1+qvscsm2BdPKCnRZ8KDR
         PoKc60LToPiC774R4/JaSu0rBx+350CTkcIoDmIAeH5TbyhcvFIaOPlk/fNYMCBDktOX
         2h5JRqQqAV10IlFwUbX47gp6Pz5rM3ptSjnyE8E6cNfCF9QLS+DvZBUi2mVS6ctSQ2Bh
         IKhPRkkMVjVE8udoBiwbnYgVmm7S1bt6vHhHpJXUHEjPaP3lN8zYLBEtsnyL6odNKgh2
         c5tTZCsvsUVLC62DtkXBdDsEX94LTN/01TSf8T45XURy8bqEsy3/DAY7ZnjUoUxvSXYB
         GxcQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc: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=2v2Z0x58UXlCE27zaTeQAnOnd7AAV0IrFS2O1MbzzyY=;
        b=TVNFqXH64sje0nkgBPamVF2At7e+sKGMe1IwqKLd0gAiQ18rKgHoMOqREUaGXX2ogS
         bNxJWBH7NHgUCUNONd2/v6qVOj/XPFE+qPxkh8VZTdaeuGxzVq18VppfT88jSyTh10hA
         oyCmEiFD6szN4Q/FVxHPZ7rW/VEsKgTK5EqzX+tF+UkAmFwbE0/U0P4zKeKKmfznkYGT
         Y2DePx2ZnyTWZj5GMg1C43D8Rehei8wRmY4t0UrOU/tg22CA1QKvzkkveGLktKs0CrDB
         bhexqM9xWAbLHr9LZurDpvG/pkCZ+ussQQYpPvt91edL0tSYCr1QOM+cUx/mlLDVG0w4
         TCmw==
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:cc: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=2v2Z0x58UXlCE27zaTeQAnOnd7AAV0IrFS2O1MbzzyY=;
        b=PBvKeXMeyNwXkrATPE16vfMl1qhw3wQdV/AOH3teELj4oRNbzpHdwBCPdRDW58J5cf
         3TIvXY5Cyq/NIAyFrkeeMRd0LmyW6+eRivPUkwmxGaglFjRL6ziskiU2259IjOaChTYW
         xVWCj1DBu0v/EW8GroxRdNimtWuINbU4Aa0krP1Ks7R/XVIjcQAQMdNj0x0ohVj7OUj1
         AR5IH66q9sI/B1AiKO7q1imsrK52k3L5UifaeARJeERCcelYeCz0cfJG5owXcJptFLkr
         rsHMo3khTzR6V4jptpm3RXJkqLm4JdYnTbmEpTwLWCU+++vJ162qYH768eS0cAXc76VC
         Ocmg==
X-Gm-Message-State: AIVw113x+Gu9rqwr9zGnVZSWISz9nx7ppLm6F/3/6oup2ELzg7Nz7xmM
	mrTXtSkJRsFX1z25
X-Received: by 10.129.67.16 with SMTP id q16mr497ywa.94.1499885264065;
        Wed, 12 Jul 2017 11:47:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.47.137 with SMTP id v9ls3572507iov.8.gmail; Wed, 12 Jul
 2017 11:46:52 -0700 (PDT)
X-Received: by 10.31.162.8 with SMTP id l8mr8319vke.20.1499885212175;
        Wed, 12 Jul 2017 11:46:52 -0700 (PDT)
In-Reply-To: <48819b6e-f08d-46b8-bc88-08d3640509a1@isocpp.org>
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:33188
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33188>

------=_Part_182_798985797.1499885211734
Content-Type: multipart/alternative; 
	boundary="----=_Part_183_464652086.1499885211734"

------=_Part_183_464652086.1499885211734
Content-Type: text/plain; charset="UTF-8"

On Wednesday, July 12, 2017 at 1:17:30 PM UTC-4, Alexander Zaitsev wrote:
>
> Yeah, you are right :)
>
> We should create the most general implementation and efficient 
> implementation for any iterator type. 
>
> Also we should decide about type of shifting: circular and/or logical 
> shifting ( https://en.wikipedia.org/wiki/Circular_shift ).
>

Isn't circular shift just `std::rotate 
<http://en.cppreference.com/w/cpp/algorithm/rotate>`?

And how would a logical shift work? Would it value-initialize all of the 
empty entries? Would it take a value to copy into them? Would it leave them 
in the moved-from state?

-- 
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/5666b7ac-b35e-4e9c-90ce-43a246b95f1a%40isocpp.org.

------=_Part_183_464652086.1499885211734
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, July 12, 2017 at 1:17:30 PM UTC-4, Alexander=
 Zaitsev 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=
">Yeah, you are right :)<div><br></div><div>We should create the most gener=
al implementation and efficient implementation for any iterator type.=C2=A0=
<br><br>Also we should decide about type of shifting: circular and/or logic=
al shifting ( <a href=3D"https://en.wikipedia.org/wiki/Circular_shift" targ=
et=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.=
google.com/url?q\x3dhttps%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCircular_shift\=
x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGhhryP9byJ1Xvxy2Ow0ybk9f0MYw&#39;;r=
eturn true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dht=
tps%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCircular_shift\x26sa\x3dD\x26sntz\x3d=
1\x26usg\x3dAFQjCNGhhryP9byJ1Xvxy2Ow0ybk9f0MYw&#39;;return true;">https://e=
n.wikipedia.org/wiki/<wbr>Circular_shift</a>=C2=A0).<br></div></div></block=
quote><div><br>Isn&#39;t circular shift just `<a href=3D"http://en.cpprefer=
ence.com/w/cpp/algorithm/rotate">std::rotate</a>`?<br><br>And how would a l=
ogical shift work? Would it value-initialize all of the empty entries? Woul=
d it take a value to copy into them? Would it leave them in the moved-from =
state?<br></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/5666b7ac-b35e-4e9c-90ce-43a246b95f1a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5666b7ac-b35e-4e9c-90ce-43a246b95f1a=
%40isocpp.org</a>.<br />

------=_Part_183_464652086.1499885211734--

------=_Part_182_798985797.1499885211734--

.
