220 33183 <CADw4SdSinGPK9rYUm4LHW-f=A3fW6R3si+Lu+AqoJ=bQNBMvTQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Dan Raviv <dan.raviv@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: [idea for proposal] Adding std::shift to <algorithm>
Date: Wed, 12 Jul 2017 16:56:11 +0300
Lines: 232
Approved: news@gmane.org
Message-ID: <CADw4SdSinGPK9rYUm4LHW-f=A3fW6R3si+Lu+AqoJ=bQNBMvTQ@mail.gmail.com>
References: <bd1a5d3b-ccc1-44ab-91cc-a4d7195c9dc3@isocpp.org> <55df161b-f0c5-4d81-ad1d-882425e7bf8a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a11408742f5858105541f2e72"
X-Trace: blaine.gmane.org 1499867809 27484 195.159.176.226 (12 Jul 2017 13:56:49 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 12 Jul 2017 13:56:49 +0000 (UTC)
Cc: "dan@soundradix.com" <dan@soundradix.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5YJREBWAGRBEGVTDFQKGQE6GEPOMA@isocpp.org Wed Jul 12 15:56:40 2017
Return-path: <std-proposals+bncBC5YJREBWAGRBEGVTDFQKGQE6GEPOMA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f198.google.com ([209.85.220.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5YJREBWAGRBEGVTDFQKGQE6GEPOMA@isocpp.org>)
	id 1dVI7w-0006AS-Bl
	for gclcip-std-proposals@m.gmane.org; Wed, 12 Jul 2017 15:56:28 +0200
Original-Received: by mail-qk0-f198.google.com with SMTP id u71sf12951344qkl.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 12 Jul 2017 06:56:34 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1499867793; cv=pass;
        d=google.com; s=arc-20160816;
        b=BkDF1GRn2GJZUPozO8gamTD4++jsT1cpPmlRoabz9eLNal9d6A5FzNjG97AVAyu5Zz
         /bjvzFDjNOtEZcMQgaGTJ0ocCCDOGLs7euqWYXoS48wh4qJA0k+OGCY78QhaLtb9tkvM
         rw8v3adeStGnJsI/pKl8IlTW6aKSJfodG9Lc+SDarcC9uzjfyiSUGrUNtBt+sgnIaMXj
         j/Wxcm1smiawqX28E1+B1WNtoizygw6zWEyfHWGJ4h3p5xpXIYHJhjc7Lv8IEW8+MBdT
         cwtADedd8sviY1NDQkyTq/XLrEdHSU5vdmdj//1b2Bjkp4Yd5xvRTiOJpBJT8I925CaQ
         nMwg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:cc:to:subject:message-id
         :date:from:references:in-reply-to:mime-version
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=y0hNYap6+F6COyVhauG546VVCL+db+HbLwVCuRYnMV4=;
        b=XvLikb33AUN9vjxAEhvYUcZcEp+GHta0pDswl6eQpWjb1+dljMZTc1HXBUuyvkOTcZ
         LUMrpPzQRB2keWeThukrkCSzvQm9TMD9J3tkhlVsipJZQRQb5xX/2WeJRyGv3PB8TVoz
         q1vuMF3HLBuFnkLxK7OImpddwxwID9kV/0cUNMYcuXo9KWYlXtrvMZCyK2LV8bN/cees
         Ypmd0AEeBUa2MCMohtxFA1nAUgQecYLFsqFXvNHNwyzC2vBTnqGqwlKZGIJoOhZkr/VN
         2TBbKL+A38aFloxYHxzrdizTkCKuwqTjk2SLhk8r/+sKi3E8/HDveyAtMSm3RLysCpmb
         xhJw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=G3rETkMS;
       spf=pass (google.com: domain of dan.raviv@gmail.com designates 2607:f8b0:4003:c06::229 as permitted sender) smtp.mailfrom=dan.raviv@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc: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=y0hNYap6+F6COyVhauG546VVCL+db+HbLwVCuRYnMV4=;
        b=V8t5QiG9TK0AG5z9VvEpdD0kI8+HMI7Yt3LL28AGmPaNrGJUtV0uriUEqeSvrTAoC7
         5D0m3odw0QnyVZzDE6YgzRej/opWZ1JqbzI67WwIPDLbZ3fEK/r0tUXVECC40k68+CoM
         Wm6pX5kePaqTwGxR0sdgWbS/QrSswFPBJFK7/QcIxYHCOiItHMjHF2DCd4E02KUauiER
         DKM934dyIopQ0tjyhZJwl8/zfC+YewQl5+LKnzDJOHBxJ0psG3fNGTS87SNmt+W8482A
         gOnXLhl84dIUsMsoqlCB0Uyq57TLmGA4xnwZGG7LDGLcnPcbZEfje4I9+hrVzg3nlEHV
         AHxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=y0hNYap6+F6COyVhauG546VVCL+db+HbLwVCuRYnMV4=;
        b=QuWkvpjFJxORlDeK52Xj+p8emRVi1X+qnc7Wh2QHeMUS28weglAkHlnokoG7plBVxQ
         tNI4zGBguYAElMeaMWW+Xlt3NXSmQdshKjGYZ7kjTg766F4ZVlH0j33SeAyl4Xx0Yojn
         oTNWJk3cm31uzqaHP1n5G3OGelIXx2d8IB3GTLBL3w4RUJYt4K6+Qs92JpUFsaHH1em2
         3JhyEUg4EjURiVu0Ojyo/FbaaUd04tq29PUokMCf+ixGJ+ZnvXod6JNAElavrUPg7Mvq
         WFeGnRLsEXKxFalP0ZZSlunmwCjxvJBS0hVmofTrCQEG1NLG5XD1PIOON7Y2mAi3NgW1
         LRFQ==
X-Gm-Message-State: AIVw113YQlZpWLTOhrPOm6P/n8j++4s+96qGbnq5oZBnQ5iAce90i6Oz
	w/VaxQj5KQpRA3g/
X-Received: by 10.200.2.7 with SMTP id k7mr3255717qtg.61.1499867793751;
        Wed, 12 Jul 2017 06:56:33 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.157.78 with SMTP id g75ls3153907ioe.17.gmail; Wed, 12 Jul
 2017 06:56:32 -0700 (PDT)
X-Received: by 10.202.50.214 with SMTP id y205mr3909019oiy.90.1499867792637;
        Wed, 12 Jul 2017 06:56:32 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1499867792; cv=none;
        d=google.com; s=arc-20160816;
        b=QK6/WP3E73eiNsKrAH7rcG5Te8v98VJ/31zvL1OXCk3IxdPrX3snnWypSGAfW0IQ0I
         lwbikqr0Psf+lYcCFFe6EXYSeSc8sHsAstxW4UsjAvbGxWih+ikIJj4PYQ+u+B4vGBYj
         0TqYxNGJHtRfx6MoDmE+LNLdNtTM/brDJzHuPQBLLRrl8xga6lPYXsuNRMKKexU2jyhc
         YOgZXkxKbtbb2CSdcbf3JypwXYcAxTIltGpYxNGxKRf13BJntmMsADAzSPdtisOBtMzp
         JVC+S7pH0WUroAbfU8VDXtmL/5mT0aBIoy7WC6CeqMnFTCfzhM1sclr8bShjmDXpRRuj
         wnaQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=cc:to:subject:message-id:date:from:references:in-reply-to
         :mime-version:dkim-signature:arc-authentication-results;
        bh=uYZKSCbQpRmET0NooqrujGh1uf5kky6lU+TJzYZ1hto=;
        b=zvSWqeLt6izTzvdnHeWKegIIRNFSL5Ltvzn3KPpxftONl4vVsPlnnWriEBOVTK5j2R
         PN8Deu5vbq1uE9lB1fKhtnvTL5sJZcp3SRggxxF7yQAZYKCot5yBxmsSU4fFiv9SkWdQ
         M3pa1hKsfkJB2+1/RBdJyuM5EtkCVlmqRtGu63l9SGCI10zhnFAD4UmKboJgWsDSR0v0
         RBTNGgF3Gh5WbFJlzyOQ18qMCieeQC+bQTtRVaN/L9gWjYxjYnNdUS7h3r0Gd2jj+Xx/
         aRAmqLlOdsO731saHJh5LHSqkMM0L9ErmutU8T24U1Ho68a6ZDZlQWpxQFahEkQ/izrH
         WaTA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=G3rETkMS;
       spf=pass (google.com: domain of dan.raviv@gmail.com designates 2607:f8b0:4003:c06::229 as permitted sender) smtp.mailfrom=dan.raviv@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com. [2607:f8b0:4003:c06::229])
        by mx.google.com with ESMTPS id c141si1749927oig.176.2017.07.12.06.56.32
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 12 Jul 2017 06:56:32 -0700 (PDT)
Received-SPF: pass (google.com: domain of dan.raviv@gmail.com designates 2607:f8b0:4003:c06::229 as permitted sender) client-ip=2607:f8b0:4003:c06::229;
Original-Received: by mail-oi0-x229.google.com with SMTP id l130so20089430oib.1
        for <std-proposals@isocpp.org>; Wed, 12 Jul 2017 06:56:32 -0700 (PDT)
X-Received: by 10.202.231.143 with SMTP id e137mr3598068oih.189.1499867792112;
 Wed, 12 Jul 2017 06:56:32 -0700 (PDT)
Original-Received: by 10.74.71.207 with HTTP; Wed, 12 Jul 2017 06:56:11 -0700 (PDT)
In-Reply-To: <55df161b-f0c5-4d81-ad1d-882425e7bf8a@isocpp.org>
X-Original-Sender: dan.raviv@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=G3rETkMS;       spf=pass (google.com: domain of
 dan.raviv@gmail.com designates 2607:f8b0:4003:c06::229 as permitted sender)
 smtp.mailfrom=dan.raviv@gmail.com;       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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:33183
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33183>

--001a11408742f5858105541f2e72
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sure, it can return an iterator (or at least have an overload which does)
similar to std::rotate / std::move.
I agree about constexpr, but I guess that would come with the rest of the
<algorithm> algorithms become constexpr.

Since it's such a simple algorithm, with the main benefit of adding it to
the STL being adding readability/efficiency/concise, I'm not whether
submitting it to boost.algorithm first would be a more effective way to go
than just making a proposal. What do you think?

Thanks,
Dan

On Wed, Jul 12, 2017 at 2:18 PM, Alexander Zaitsev <zamazan4ik@gmail.com>
wrote:

> Hello.
>
> Really nice idea! But i have some suggestions:
> * shift should return iterator (or two)
> * it should be constexpr
>
> Also i suggest you create PR to Boost.Algorithm (or we can work together =
-
> i will help you as mush as possible). And after including into
> Bost.Algorithm we can write proposal to C++ Standard.
>
> =D1=81=D1=80=D0=B5=D0=B4=D0=B0, 12 =D0=B8=D1=8E=D0=BB=D1=8F 2017 =D0=B3.,=
 12:53:19 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=
=B5=D0=BB=D1=8C d...@soundradix.com
> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>>
>> Hi,
>>
>> Would anyone be interested in adding std::shift to <algorithm>?
>>
>> It would be similar to both:
>> - std::rotate, but without moving the head elements back to the tail.
>> This would allow a more efficient implementation and clearer semantics i=
n
>> case rotation is not needed as well as correctness in case rotation is
>> undesired.
>> - <algorithm>'s std::move/std::move_backward (depending on the shift
>> direction).
>>
>> std::shift should probably accommodate both left and right shifts by one
>> of:
>> - giving it either begin() and end(), or rbegin() and rend(), similar to
>> how std::rotate works for both left and right rotations. The advantage i=
s
>> compactness of the implementation.
>> - allowing the shift count parameter to be either positive or negative.
>> The advantage is compactness, though it might not be clear which directi=
on
>> is which - to be consistent with rotate, positive integers should shift =
to
>> the left.
>> - having std::shift_right and std::shift_left functions. The advantage i=
s
>> clarity when calling the methods, although the same argument could be ma=
de
>> for having separate std::rotate_left and std::rotate_right instead of
>> std::rotate, which we don't have.
>>
>> Here's a sample implementation of a shift to the right direction:
>>
>> template<class BidirIt>
>> void shift_right(BidirIt first, BidirIt last, unsigned int n =3D 1)
>> {
>>     std::move_backward(first, last - n, last);
>> }
>>
>> This demonstrates that while std::shift is implementable with
>> std::move/std::move_backward,
>> 1) It isn't immediately clear from the code (at least to my eyes) that
>> this is a shift right, unless you are intimately familiar with
>> std::move_backward.
>> 2) Different calls, either to std::move or to std::move_backward, are
>> required, depending on the shift direction.
>>
>> So, implementing std::shift would allow writing more readable code.
>>
>> Thanks,
>> Dan
>>
> --
> 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/55df161b-f0c5-4d81-
> ad1d-882425e7bf8a%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/55df161b-f0=
c5-4d81-ad1d-882425e7bf8a%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CADw4SdSinGPK9rYUm4LHW-f%3DA3fW6R3si%2BLu%2BAqoJ=
%3DbQNBMvTQ%40mail.gmail.com.

--001a11408742f5858105541f2e72
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Sure, it can return an iterator (or at least have an overl=
oad which does) similar to std::rotate / std::move.<div>I agree about const=
expr, but I guess that would come with the rest of the &lt;algorithm&gt; al=
gorithms become constexpr.</div><div><br></div><div>Since it&#39;s such a s=
imple algorithm, with the main benefit of adding it to the STL being adding=
 readability/efficiency/<wbr>concise, I&#39;m not whether submitting it to =
boost.algorithm first would be a more effective way to go than just making =
a proposal. What do you think?</div><div><br></div><div>Thanks,</div><div>D=
an</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On =
Wed, Jul 12, 2017 at 2:18 PM, Alexander Zaitsev <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:zamazan4ik@gmail.com" target=3D"_blank">zamazan4ik@gmail.com</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hel=
lo.<div><br></div><div>Really nice idea! But i have some suggestions:</div>=
<div>* shift should return iterator (or two)</div><div>* it should be const=
expr</div><div><br></div><div>Also i suggest you create PR to Boost.Algorit=
hm (or we can work together - i will help you as mush as possible). And aft=
er including into Bost.Algorithm we can write proposal to C++ Standard.<br>=
<br>=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 12 =D0=B8=D1=8E=D0=BB=D1=8F 2017 =D0=B3=
.., 12:53:19 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=
=B5=D0=BB=D1=8C <a href=3D"mailto:d...@soundradix.com" target=3D"_blank">d.=
...@soundradix.com</a> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<span clas=
s=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hi,<div><br=
></div><div>Would anyone be interested in adding std::shift to &lt;algorith=
m&gt;?=C2=A0</div><div><br></div><div>It would be similar to both:</div><di=
v>- std::rotate, but without moving the head elements back to the tail. Thi=
s would allow a more efficient implementation and clearer semantics in case=
 rotation is not needed as well as correctness in case rotation is undesire=
d.</div><div>- &lt;algorithm&gt;&#39;s std::move/std::move_backward (depend=
ing on the shift direction).</div><div><br></div><div>std::shift should pro=
bably accommodate both left and right shifts by one of:</div><div>- giving =
it either begin() and end(), or rbegin() and rend(), similar to how std::ro=
tate works for both left and right rotations. The advantage is compactness =
of the implementation.</div><div>- allowing the shift count parameter to be=
 either positive or negative. The advantage is compactness, though it might=
 not be clear which direction is which - to be consistent with rotate, posi=
tive integers should shift to the left.<br></div><div><div>- having std::sh=
ift_right and std::shift_left functions. The advantage is clarity when call=
ing the methods, although the same argument could be made for having separa=
te std::rotate_left and std::rotate_right instead of std::rotate, which we =
don&#39;t have.</div></div><div><br></div><div>Here&#39;s a sample implemen=
tation of a shift to the right direction:</div><br><div style=3D"background=
-color:rgb(250,250,250);border:1px solid rgb(187,187,187);word-wrap:break-w=
ord"><code><div><span style=3D"color:#008">template</span><span style=3D"co=
lor:#660">&lt;</span><span style=3D"color:#008">class</span><span style=3D"=
color:#000"> </span><span style=3D"color:#606">BidirIt</span><span style=3D=
"color:#660">&gt;</span><span style=3D"color:#000"> <br></span><span style=
=3D"color:#008">void</span><span style=3D"color:#000"> shift_right</span><s=
pan style=3D"color:#660">(</span><span style=3D"color:#606">BidirIt</span><=
span style=3D"color:#000"> first</span><span style=3D"color:#660">,</span><=
span style=3D"color:#000"> </span><span style=3D"color:#606">BidirIt</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#008">last</span><s=
pan style=3D"color:#660">,</span><span style=3D"color:#000"> </span><span s=
tyle=3D"color:#008">unsigned</span><span style=3D"color:#000"> </span><span=
 style=3D"color:#008">int</span><span style=3D"color:#000"> n </span><span =
style=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span sty=
le=3D"color:#066">1</span><span style=3D"color:#660">)</span><span style=3D=
"color:#000"> <br></span><span style=3D"color:#660">{</span><span style=3D"=
color:#000"> <br>=C2=A0 =C2=A0 std</span><span style=3D"color:#660">::</spa=
n><span style=3D"color:#000">move_backward</span><span style=3D"color:#660"=
>(</span><span style=3D"color:#000">first</span><span style=3D"color:#660">=
,</span><span style=3D"color:#000"> </span><span style=3D"color:#008">last<=
/span><span style=3D"color:#000"> </span><span style=3D"color:#660">-</span=
><span style=3D"color:#000"> n</span><span style=3D"color:#660">,</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#008">last</span><span=
 style=3D"color:#660">);</span><span style=3D"color:#000"> <br></span><span=
 style=3D"color:#660">}</span><span style=3D"color:#000"><br></span></div><=
/code></div><div><br></div><div>This demonstrates that while std::shift is =
implementable with std::move/std::move_backward,</div><div>1) It isn&#39;t =
immediately clear from the code (at least to my eyes) that this is a shift =
right, unless you are intimately familiar with std::move_backward.</div><di=
v>2) Different calls, either to std::move or to std::move_backward, are req=
uired, depending on the shift direction.</div><div><br></div><div>So, imple=
menting std::shift would allow writing more readable code.</div><div><br></=
div><div>Thanks,</div><div>Dan</div></div></blockquote></span></div></div><=
span class=3D"">

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/55df161b-f0c5-4d81-ad1d-882425e7bf8a%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/55df=
161b-f0c5-4d81-<wbr>ad1d-882425e7bf8a%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CADw4SdSinGPK9rYUm4LHW-f%3DA3fW6R3si%=
2BLu%2BAqoJ%3DbQNBMvTQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CADw4SdSi=
nGPK9rYUm4LHW-f%3DA3fW6R3si%2BLu%2BAqoJ%3DbQNBMvTQ%40mail.gmail.com</a>.<br=
 />

--001a11408742f5858105541f2e72--

.
