220 33812 <B003EA60-F9B0-480A-9C1B-F40F2881621B@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Bryce Glover <randomdsdevel@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: [idea for proposal] Adding std::shift to <algorithm>
Date: Thu, 10 Aug 2017 21:08:11 -0400
Lines: 453
Approved: news@gmane.org
Message-ID: <B003EA60-F9B0-480A-9C1B-F40F2881621B@gmail.com>
References: <344B1400-86F7-4D11-A7B0-ABB44D5AF397@gmail.com> <CAJ7KwrNBwhHuN0QLE8hrJyaMakj322zm4dOQ4OiBFpDveSHZSQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_043565F1-B467-4D2E-807F-427BCB55FD96"
X-Trace: blaine.gmane.org 1502413701 7611 195.159.176.226 (11 Aug 2017 01:08:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 11 Aug 2017 01:08:21 +0000 (UTC)
Cc: std-proposals@isocpp.org
To: Dan Raviv <dan@soundradix.com>
Original-X-From: std-proposals+bncBCPMBF5ZZEBBBAEHWTGAKGQESFAAH6Y@isocpp.org Fri Aug 11 03:08:16 2017
Return-path: <std-proposals+bncBCPMBF5ZZEBBBAEHWTGAKGQESFAAH6Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pg0-f69.google.com ([74.125.83.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCPMBF5ZZEBBBAEHWTGAKGQESFAAH6Y@isocpp.org>)
	id 1dfyQt-0001Ky-N2
	for gclcip-std-proposals@m.gmane.org; Fri, 11 Aug 2017 03:08:12 +0200
Original-Received: by mail-pg0-f69.google.com with SMTP id 83sf23233510pgb.14
        for <gclcip-std-proposals@m.gmane.org>; Thu, 10 Aug 2017 18:08:18 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1502413697; cv=pass;
        d=google.com; s=arc-20160816;
        b=oL8Csmps110Cp2rEHohQwx67EEnDxI39xAM3YLTAGmJe/ukrhLYhQoXxBXcUcegI3P
         3o/qUYA2GX8l7mFu99OZ4iJy81uBJBNgNRDSHm17e6E4tdjH2qZXUSNhyTov3tOtVZyD
         fENK6NlXszswBHTtw4XThoqSFgNw9dFdIHQliZWqqL2tOj3edIRDgTfOwF5V/SabpSae
         MXsC3TPMFGC08torCjkDg5So1LtqP4LF+5o0ICnMDXCD9kt6c9seJNgchQ4WdzSltNqj
         vkj8W0Z3/Ja3n2McsGbvfO4GZhQWAGrlRpP9IF3UFXNIinYp+99dB9UHDdDx8u+C0D+r
         DhAw==
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:to:references:message-id
         :cc:date:in-reply-to:subject:mime-version:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=DubGhqIv7Np0CbvhpvAi4gfZz+ClzulthF/y+668tSY=;
        b=UeC83Kv1NyuczTwFv+ynQCPcHixoBW/GFkoo2d7c1r+v9VpvikYxcELih8q4dil4B5
         6RcC+HsS+xTGRssiQs7FzQTCF8EprmvpnbbQwvF9tpX7gesCF8aJdqh50hvLzq3DQxRt
         uuXvVmT271TVI8s21a0xBViARXnppuY/HcEqH2FuGvBprdL0q9WKf95+zLCzQm8o+u3d
         s3rBbEYyNKXI1c77cUw0uiNy3NMP6+QHZWDYNExn7eHhXLZXb0ojuSt/4HGbaZv73f/1
         QgNLpI5GbxX4iPTdm+0RnLmADjBN6/4eXLgrNAUn8ZKpBtRLHLcsba/lKie2WESnxXmi
         zPPA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=fySA5RmS;
       spf=pass (google.com: domain of randomdsdevel@gmail.com designates 2607:f8b0:4001:c06::243 as permitted sender) smtp.mailfrom=randomdsdevel@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=from:mime-version:subject:in-reply-to:date:cc:message-id:references
         :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;
        bh=DubGhqIv7Np0CbvhpvAi4gfZz+ClzulthF/y+668tSY=;
        b=KUTCnXXaRiE7Hw//M408SG8pK7G9KVJdK13WVA8+WJuxSHLrBMpfaMt8lYSSW1FNap
         qZ1ZeGX7l0ffXTfmsPK3qn7zvHK8f9NFHe59RlHVVAzHBJGI3YFbU/wkUCAeJCcKIPDI
         CCbsjlrhtX5tKwUC/gsWKAxxouPwMkYVgdKiTIqg6ClIHoqYQx3mxOi64IrvU3/Hv7CF
         LV+fLyBRyjAEQQo5FJV6NKLSD+IYJKtxKcLep1/EnXglhGKz8I9/o9qfyqP5L1KS2R/S
         5r7aEZtckHdWHK3uod7bE3qvsFok49y/SMCnMPhyXSvereG7+KtJb8x/C+qdvKKKXQ4C
         n1+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:mime-version:subject:in-reply-to:date:cc
         :message-id:references:to: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=DubGhqIv7Np0CbvhpvAi4gfZz+ClzulthF/y+668tSY=;
        b=mDhE3r83+EqeupW/vJ5fGl1BG7KZ665v8r3U/dxb7wCPPHDE8y5alrKJQ0STCVQHcM
         6xSoFuh6yEbGCN6l868IKT6hMS2vb4IjczqVdwv4xw2RO3ZiGNfFTj6VRrNlrUw2VqRh
         MJ95wBEaHl1RYcheIjLX9sQZVF0VrMS+oCyHyJ6c+Jp4K77o5mjRzX+MC9QoszpicJ09
         oPZU/JsVT3GcU8b88ZodkKTLWuRiuuVgr2YsZpS3zTrD90YD5naQ691xQIQ5sShqwA0y
         8lVqzQx0HuR7M+pUlBd90Pf9NF+nPY8a8LEO7gcAjwjf1QHLwpLzrWMcaxqmTKRwust+
         dU4Q==
X-Gm-Message-State: AHYfb5hOkGRWAlw6uC2Z/2myh1LIgrYQu0vSegwuuTe4jeTNiEop5pRu
	cwqqIc0WGq8dcS4u
X-Received: by 10.98.66.204 with SMTP id h73mr8252546pfd.22.1502413697429;
        Thu, 10 Aug 2017 18:08:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.111.9 with SMTP id x9ls435374itb.16.gmail; Thu, 10 Aug 2017
 18:08:16 -0700 (PDT)
X-Received: by 10.202.197.74 with SMTP id v71mr17842301oif.40.1502413695976;
        Thu, 10 Aug 2017 18:08:15 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1502413695; cv=none;
        d=google.com; s=arc-20160816;
        b=ieONFd4eQ3I2a0dR4M97xykxSsaVp/UWH7gcX2Ent2ll2W8ZmS8qx1Q5RUS9Pu4uYq
         P3RynrIy9zdkXGRVNO59Ct4rAfQ1vc32MtgcedueuPv207rwdqvzyen+4R1lqr+jcyjK
         uFoRAGkSacExD3BDUdcgNQg5aoeCS9vDKW1dSjdziRYJx/rTFs3XRQEiEnI95u4tZfVE
         nEDKNwz2gX0HZekYvMznWy2NF5Z8uSfd03vaZyHHNQRZnook3wfeUgickVkfpX1ul3GX
         RH82ZJZ09L8qo3zer7L7v6zK0SA8DyqwirYBxw/r8L0u6byTx2NtIMB9b2fqhFSf232w
         XK+g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:references:message-id:cc:date:in-reply-to:subject:mime-version
         :from:dkim-signature:arc-authentication-results;
        bh=PgsDz9KROpUxFEvJm7ounpKb68BsYbvyps4SHGsUU3g=;
        b=QR1cWVGoWHut+upHQvh5tR/sEDUJ2+hoQhSHd/NWx6zTxhwqypC8bbX9gMaXINWhTg
         LT/9fi2DGfGgFvYU3KmkLLRJWek0whmlFp+GtyXTNI58hAVkOD0oUgkmJ7dN49z0z+Kb
         w7BLr0dUANQV/U6oeXZzL5xiDpDNoLwguRqr5lSb2cHR+M4qmHGMGRapEkU1C1Xi2gzj
         B9tdZdD5YFgU0CIPL30vMzvSt65o4gQpsAgtz4vAo9mSkr5cwsG5eSEN0G9fPdNPeN0R
         2tHP1sFAuUkweXqLyEo2qrgj9fM8LdnPS48KH1HD8jBFLnP1safNBMP3KvneHs0HTKVE
         nf5w==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=fySA5RmS;
       spf=pass (google.com: domain of randomdsdevel@gmail.com designates 2607:f8b0:4001:c06::243 as permitted sender) smtp.mailfrom=randomdsdevel@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-io0-x243.google.com (mail-io0-x243.google.com. [2607:f8b0:4001:c06::243])
        by mx.google.com with ESMTPS id a6si6055819oic.542.2017.08.10.18.08.15
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 10 Aug 2017 18:08:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of randomdsdevel@gmail.com designates 2607:f8b0:4001:c06::243 as permitted sender) client-ip=2607:f8b0:4001:c06::243;
Original-Received: by mail-io0-x243.google.com with SMTP id q64so2623809ioi.0
        for <std-proposals@isocpp.org>; Thu, 10 Aug 2017 18:08:15 -0700 (PDT)
X-Received: by 10.107.164.98 with SMTP id n95mr11198241ioe.38.1502413695622;
        Thu, 10 Aug 2017 18:08:15 -0700 (PDT)
Original-Received: from [10.0.1.5] (c-68-50-177-220.hsd1.in.comcast.net. [68.50.177.220])
        by smtp.gmail.com with ESMTPSA id y4sm1169356itb.22.2017.08.10.18.08.14
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Thu, 10 Aug 2017 18:08:14 -0700 (PDT)
In-Reply-To: <CAJ7KwrNBwhHuN0QLE8hrJyaMakj322zm4dOQ4OiBFpDveSHZSQ@mail.gmail.com>
X-Mailer: Apple Mail (2.3124)
X-Original-Sender: RandomDSdevel@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=fySA5RmS;       spf=pass
 (google.com: domain of randomdsdevel@gmail.com designates 2607:f8b0:4001:c06::243
 as permitted sender) smtp.mailfrom=randomdsdevel@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:33812
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33812>


--Apple-Mail=_043565F1-B467-4D2E-807F-427BCB55FD96
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"


> On Aug 10, 2017, at 4:04 AM, Dan Raviv <dan@soundradix.com> wrote:
>=20
> Hi Bryce,
>=20
> Thanks for the feedback! =E2=80=A6

     You=E2=80=99re welcome! =20

> =E2=80=A6Comments inline.
>=20
> =E2=8B=AE

     Mine will be, too, then. =20

> =E2=8B=AE
>=20
> On Sun, Jul 30, 2017 at 5:56 AM, Bryce Glover <randomdsdevel@gmail.com <m=
ailto:randomdsdevel@gmail.com>> wrote:
> Dear Mr. Raviv,=20
>=20
>      Here are a thread lurker=E2=80=99s comments on your proposal.  First=
, your first footnote reads: =20
>=20
>> =C2=B9 Technically, in some cases std::move can be used with reverse ite=
rators to implement a shift of elements forward, but not in all cases and i=
t is also less efficient, see https://groups.google.com/a/isocpp.org/d/msg/=
std-proposals/I76om68B3t0/25bGu7O6AwAj <https://groups.google.com/a/isocpp.=
org/d/msg/std-proposals/I76om68B3t0/25bGu7O6AwAj> and https://groups.google=
..com/a/isocpp.org/d/msg/std-proposals/I76om68B3t0/SPTeZdofAQAJ <https://gro=
ups.google.com/a/isocpp.org/d/msg/std-proposals/I76om68B3t0/SPTeZdofAQAJ>. =
=20
>=20
> Within this statement, the part saying, =E2=80=9Cstd::move can be used wi=
th reverse iterators to implement a shift of elements forward,=E2=80=9D sho=
uld either read, =E2=80=9Cstd::move can be used with reverse iterators to i=
mplement a shift of elements backward,=E2=80=9D (emphasis added by me) or, =
=E2=80=9Cstd::move_backwards can be used with reverse iterators to implemen=
t a shift of elements forward,=E2=80=9D (emphasis here also added by me,) a=
s only one of these alternatives could render the sentence self-consistent =
with both itself and the rest of your document.
>=20
> Either you got it backwards (no pun intended), =E2=80=A6

     No worries!  I often appreciate a good pun. =20

> =E2=80=A6or I did - in any case, this proves the proposal point of std::m=
ove[_backwards] being too confusing for implementing shift, which is great =
:)
>=20
> =E2=80=A6


     Glad to be of assistance, then. =20

> =E2=80=A6
>=20
> Take a look at my sample implementation <https://github.com/danra/shift_p=
roposal> - you'll see that, assuming non-reverse iterators are passed to sh=
ift(), std::move_backward is used for implementing a right (forward) shift =
of elements, and std::move is used for implementing a left (backward) shift=
 of elements.
>=20
> It can=E2=80=99t work correctly the other way around - if you try using s=
td::move for implementing a right (forward) shift (with regular iterators) =
then the first moved element is going to overwrite an element which still h=
asn't been shifted.
>=20
> =E2=8B=AE


     Oooo-h:  whoops, I tend to think of moving elements within data struct=
ures in terms of a circular or non-circular shifting operation, depending o=
n which kind of wrapping behavior I want.  This probably comes from how I m=
ost likely haven=E2=80=99t written nearly as much code as most of the peopl=
e participating in discussion threads here on std-proposals and was conside=
ring things based on a mental model of a diagram of a contiguous data struc=
ture, such as a simple array or multiset, drawn/written down on paper.  Now=
 that it=E2=80=99s clicked that the directionality of the move operations i=
nvolved in shifting elements around a data structure like this depends, at =
least in name, on how one iterates through it, things make more of a certai=
n kind of sense.  I=E2=80=99m still processing this miniature revelation, t=
hough, so the logic behind this still seems=E2=80=A6a bit mind-bending to m=
e, to be frank. =20

> =E2=8B=AE
> =20
>  Also, your use of =E2=80=98in some cases=E2=80=99 should be followed by =
a comma, though I acknowledge that two comma-suffixed dependent <https://en=
..wikipedia.org/wiki/Dependent_clause> relative clauses <https://en.wikipedi=
a.org/wiki/Relative_clause> (at least, I think that=E2=80=99s what they=E2=
=80=99re called; you can correct me if my grammar=E2=80=99s off) coming one=
 after another at the beginning of a sentence can read somewhat awkwardly. =
 A reasonable way around that stylistic issue would be to keep =E2=80=99Tec=
hnically, =E2=80=A6=E2=80=99 at the beginning of the sentence, but move =E2=
=80=98in some cases=E2=80=99 later on within it=E2=80=89=E2=80=94=E2=80=89s=
pecifically, between =E2=80=98can=E2=80=99 and =E2=80=98be=E2=80=99 such th=
at the resulting sentence fragment would, properly using commas as delimite=
rs, read as, =E2=80=9C=E2=80=A6, std::move can, in some cases, be used=E2=
=80=A6.=E2=80=9D  (If the thought of splitting infinitives brings you dista=
ste, I can explain myself:  it turns out that the validity of the rule agai=
nst doing so is actually a matter of dispute <https://en.wikipedia.org/wiki=
/West_Germanic_languages>.) =20
>=20
> How about this instead?
> Technically, std::move can, in some cases, be used with reverse iterators=
 to implement a shift of elements forward, but not in all cases. It is also=
 less efficient; see https://groups.google.com/a/isocpp.org/d/msg/std-propo=
sals/I76om68B3t0/25bGu7O6AwAJ <https://groups.google.com/a/isocpp.org/d/msg=
/std-proposals/I76om68B3t0/25bGu7O6AwAJ> and https://groups.google.com/a/is=
ocpp.org/d/msg/std-proposals/I76om68B3t0/SPTeZdofAQAJ <https://groups.googl=
e.com/a/isocpp.org/d/msg/std-proposals/I76om68B3t0/SPTeZdofAQAJ>.
> =20
> =E2=8B=AE


     =E2=80=98In some cases=E2=80=99 usually implies =E2=80=98but not in al=
l cases,=E2=80=99 but, yeah, that reads well enough to me. =20

> =E2=8B=AE
>=20
>      Second, you might wish to reevaluate your use of fonts:  some functi=
on names referenced within particular sentences are not in code font when t=
hey should be. =20
>=20
> Done.
>=20
> =E2=8B=AE

     Again, glad to be of service. =20

> =E2=8B=AE
> =20
> Other than these concerns and those parts of your proposal which you have=
 yet to fill in, the document hosting it looks good so far. =20
>=20
> Regards,=20
>      Bryce Glover
>      RandomDSdevel@gmail.com <mailto:RandomDSdevel@gmail.com>
>=20
> Thanks!
> Dan=20
>=20
> --=20
> You received this message because you are subscribed to a topic in the Go=
ogle Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/I76om68B3t0/unsubscribe <https://groups.google.co=
m/a/isocpp.org/d/topic/std-proposals/I76om68B3t0/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to std-p=
roposals+unsubscribe@isocpp.org <mailto:std-proposals+unsubscribe@isocpp.or=
g>.
> To post to this group, send email to std-proposals@isocpp.org <mailto:std=
-proposals@isocpp.org>.
> To view this discussion on the web visit https://groups.google.com/a/isoc=
pp.org/d/msgid/std-proposals/344B1400-86F7-4D11-A7B0-ABB44D5AF397%40gmail.c=
om <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/344B1400-8=
6F7-4D11-A7B0-ABB44D5AF397%40gmail.com?utm_medium=3Demail&utm_source=3Dfoot=
er>.

     Again, you=E2=80=99re very welcome. =20

Regards,=20
     Bryce Glover
     RandomDSdevel@gmail.com

--=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/B003EA60-F9B0-480A-9C1B-F40F2881621B%40gmail.com=
..

--Apple-Mail=_043565F1-B467-4D2E-807F-427BCB55FD96
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="UTF-8"

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On Aug 10, 2017, at =
4:04 AM, Dan Raviv &lt;<a href=3D"mailto:dan@soundradix.com" class=3D"">dan=
@soundradix.com</a>&gt; wrote:</div><br class=3D"Apple-interchange-newline"=
><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica; font-siz=
e: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal=
; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0p=
x; text-transform: none; white-space: normal; widows: auto; word-spacing: 0=
px; -webkit-text-stroke-width: 0px;" class=3D"">Hi Bryce,<div class=3D""><b=
r class=3D""></div><div class=3D"">Thanks for the feedback! =E2=80=A6</div>=
</div></div></blockquote><div><br class=3D""></div><div>&nbsp; &nbsp; &nbsp=
;You=E2=80=99re welcome! &nbsp;</div><br class=3D""><blockquote type=3D"cit=
e" class=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvet=
ica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-w=
eight: normal; letter-spacing: normal; orphans: auto; text-align: start; te=
xt-indent: 0px; text-transform: none; white-space: normal; widows: auto; wo=
rd-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><div class=3D"=
">=E2=80=A6Comments inline.</div></div></div></blockquote><div><blockquote =
type=3D"cite" class=3D""><br class=3D""></blockquote><blockquote type=3D"ci=
te" class=3D"">=E2=8B=AE</blockquote><br class=3D""></div><div>&nbsp; &nbsp=
; &nbsp;Mine will be, too, then. &nbsp;</div><div><br class=3D""></div><blo=
ckquote type=3D"cite" class=3D"">=E2=8B=AE</blockquote><blockquote type=3D"=
cite" class=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-family: Hel=
vetica; font-size: 14px; font-style: normal; font-variant-caps: normal; fon=
t-weight: normal; letter-spacing: normal; orphans: auto; text-align: start;=
 text-indent: 0px; text-transform: none; white-space: normal; widows: auto;=
 word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><div class=
=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Sun, Jul 30, =
2017 at 5:56 AM, Bryce Glover<span class=3D"Apple-converted-space">&nbsp;</=
span><span dir=3D"ltr" class=3D"">&lt;<a href=3D"mailto:randomdsdevel@gmail=
..com" target=3D"_blank" class=3D"">randomdsdevel@gmail.com</a>&gt;</span><s=
pan class=3D"Apple-converted-space">&nbsp;</span>wrote:<br class=3D""><bloc=
kquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-lef=
t-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 20=
4); padding-left: 1ex;"><div style=3D"word-wrap: break-word;" class=3D""><d=
iv class=3D"">Dear Mr. Raviv,&nbsp;</div><div class=3D""><br class=3D""></d=
iv><div class=3D"">&nbsp; &nbsp; &nbsp;Here are a thread lurker=E2=80=99s c=
omments on your proposal.&nbsp; First, your first footnote reads: &nbsp;</d=
iv><div class=3D""><br class=3D""></div><div class=3D""><blockquote type=3D=
"cite" class=3D"">=C2=B9 Technically, in some cases std::move can be used w=
ith reverse iterators to implement a shift of elements forward, but not in =
all cases and it is also less efficient, see<span class=3D"Apple-converted-=
space">&nbsp;</span><a href=3D"https://groups.google.com/a/isocpp.org/d/msg=
/std-proposals/I76om68B3t0/25bGu7O6AwAj" target=3D"_blank" class=3D"">https=
://groups.google.com/a/<wbr class=3D"">isocpp.org/d/msg/std-<wbr class=3D""=
>proposals/I76om68B3t0/<wbr class=3D"">25bGu7O6AwAj</a>&nbsp;and<span class=
=3D"Apple-converted-space">&nbsp;</span><a href=3D"https://groups.google.co=
m/a/isocpp.org/d/msg/std-proposals/I76om68B3t0/SPTeZdofAQAJ" target=3D"_bla=
nk" class=3D"">https://groups.google.com/a/<wbr class=3D"">isocpp.org/d/msg=
/std-<wbr class=3D"">proposals/I76om68B3t0/<wbr class=3D"">SPTeZdofAQAJ</a>=
.. &nbsp;</blockquote></div><br class=3D""><div class=3D"">Within this state=
ment, the part saying, =E2=80=9Cstd::move can be used with reverse iterator=
s to implement a shift of elements forward,=E2=80=9D should either read, =
=E2=80=9Cstd::move can be used with reverse iterators to implement a shift =
of elements<span class=3D"Apple-converted-space">&nbsp;</span><i class=3D""=
>backward</i>,=E2=80=9D (emphasis added by me) or, =E2=80=9Cstd::move<i cla=
ss=3D"">_backwards</i>&nbsp;can be used with reverse iterators to implement=
 a shift of elements forward,=E2=80=9D (emphasis here also added by me,) as=
 only one of these alternatives could render the sentence self-consistent w=
ith both itself and the rest of your document.</div></div></blockquote><div=
 class=3D""><br class=3D""></div><div class=3D"">Either you got it backward=
s (no pun intended), =E2=80=A6</div></div></div></div></div></blockquote><d=
iv><br class=3D""></div><div>&nbsp; &nbsp; &nbsp;No worries! &nbsp;I often =
appreciate a good pun. &nbsp;</div><br class=3D""><blockquote type=3D"cite"=
 class=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetic=
a; font-size: 14px; font-style: normal; font-variant-caps: normal; font-wei=
ght: normal; letter-spacing: normal; orphans: auto; text-align: start; text=
-indent: 0px; text-transform: none; white-space: normal; widows: auto; word=
-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><div class=3D"gm=
ail_extra"><div class=3D"gmail_quote"><div class=3D"">=E2=80=A6or I did - i=
n any case, this proves the proposal point of std::move[_backwards] being t=
oo confusing for implementing shift, which is great :)</div></div></div></d=
iv></div></blockquote><div><blockquote type=3D"cite" class=3D""><br class=
=3D""></blockquote><blockquote type=3D"cite" class=3D"">=E2=80=A6</blockquo=
te></div><div><br class=3D""></div><div>&nbsp; &nbsp; &nbsp;Glad to be of a=
ssistance, then. &nbsp;</div><div><br class=3D""></div><blockquote type=3D"=
cite" class=3D"">=E2=80=A6</blockquote><blockquote type=3D"cite" class=3D""=
><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica; font-siz=
e: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal=
; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0p=
x; text-transform: none; white-space: normal; widows: auto; word-spacing: 0=
px; -webkit-text-stroke-width: 0px;" class=3D""><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><div class=3D""><br class=3D""></div><div class=
=3D"">Take a look at my<span class=3D"Apple-converted-space">&nbsp;</span><=
a href=3D"https://github.com/danra/shift_proposal" class=3D"">sample implem=
entation</a><span class=3D"Apple-converted-space">&nbsp;</span>- you'll see=
 that, assuming non-reverse iterators are passed to shift(), std::move_back=
ward is used for implementing a right (forward) shift of elements, and std:=
:move is used for implementing a left (backward) shift of elements.</div><d=
iv class=3D""><br class=3D""></div><div class=3D"">It can=E2=80=99t work co=
rrectly the other way around - if you try using std::move for implementing =
a right (forward) shift (with regular iterators) then the first moved eleme=
nt is going to overwrite an element which still hasn't been shifted.</div><=
/div></div></div></div></blockquote><div><blockquote type=3D"cite" class=3D=
""><br class=3D""></blockquote><blockquote type=3D"cite" class=3D"">=E2=8B=
=AE</blockquote></div><div><br class=3D""></div><div>&nbsp; &nbsp; &nbsp;<i=
 class=3D"">Oooo</i>-h: &nbsp;whoops, I tend to think of moving elements wi=
thin data structures in terms of a circular or non-circular shifting operat=
ion, depending on which kind of wrapping behavior I want. &nbsp;This probab=
ly comes from how I most likely haven=E2=80=99t written <i class=3D"">nearl=
y</i>&nbsp;as much code as most of the people participating in discussion t=
hreads here on std-proposals and was considering things based on a mental m=
odel of a diagram of a contiguous data structure, such as a simple array or=
 multiset, drawn/written down on paper. &nbsp;Now that it=E2=80=99s clicked=
 that the directionality of the move operations involved in shifting elemen=
ts around a data structure like this depends, at least in name, on how one =
<i class=3D"">iterates</i>&nbsp;through it, things make more of a certain k=
ind of sense. &nbsp;I=E2=80=99m still processing this miniature revelation,=
 though, so the logic behind this&nbsp;<i class=3D"">still</i>&nbsp;seems=
=E2=80=A6a <i class=3D"">bit</i>&nbsp;mind-bending to me, to be frank. &nbs=
p;</div><div><br class=3D""></div><blockquote type=3D"cite" class=3D"">=E2=
=8B=AE</blockquote><blockquote type=3D"cite" class=3D""><div class=3D""><di=
v dir=3D"ltr" style=3D"font-family: Helvetica; font-size: 14px; font-style:=
 normal; font-variant-caps: normal; font-weight: normal; letter-spacing: no=
rmal; orphans: auto; text-align: start; text-indent: 0px; text-transform: n=
one; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-str=
oke-width: 0px;" class=3D""><div class=3D"gmail_extra"><div class=3D"gmail_=
quote"><div class=3D"">&nbsp;</div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: s=
olid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style=
=3D"word-wrap: break-word;" class=3D""><div class=3D"">&nbsp;Also, your use=
 of =E2=80=98in some cases=E2=80=99 should be followed by a comma, though I=
 acknowledge that two comma-suffixed&nbsp;<a href=3D"https://en.wikipedia.o=
rg/wiki/Dependent_clause" target=3D"_blank" class=3D"">dependent</a>&nbsp;<=
a href=3D"https://en.wikipedia.org/wiki/Relative_clause" target=3D"_blank" =
class=3D"">relat<wbr class=3D"">ive clauses</a>&nbsp;(at least, I<span clas=
s=3D"Apple-converted-space">&nbsp;</span><i class=3D"">think</i>&nbsp;that=
=E2=80=99s what they=E2=80=99re called; you can correct me if my grammar=E2=
=80=99s off) coming one after another at the beginning of a sentence can re=
ad somewhat awkwardly.&nbsp; A reasonable way around that stylistic issue w=
ould be to keep =E2=80=99Technically, =E2=80=A6=E2=80=99 at the beginning o=
f the sentence, but move =E2=80=98in some cases=E2=80=99 later on within it=
=E2=80=89=E2=80=94=E2=80=89specifically, between =E2=80=98can=E2=80=99 and =
=E2=80=98be=E2=80=99 such that the resulting sentence fragment would, prope=
rly using commas as delimiters, read as, =E2=80=9C=E2=80=A6, std::move can,=
 in some cases, be used=E2=80=A6.=E2=80=9D &nbsp;(If the thought of splitti=
ng infinitives brings you distaste, I can explain myself: &nbsp;it turns ou=
t that the validity of the rule against doing so is actually&nbsp;<a href=
=3D"https://en.wikipedia.org/wiki/West_Germanic_languages" target=3D"_blank=
" class=3D"">a matter of dispute</a>.) &nbsp;</div></div></blockquote><div =
class=3D""><br class=3D""></div><div class=3D"">How about this instead?</di=
v><div class=3D""><div style=3D"margin: 0px; font-size: 11px; line-height: =
normal; font-family: Helvetica;" class=3D""><span style=3D"-webkit-font-ker=
ning: none;" class=3D"">Technically, std::move can, in some cases, be used =
with reverse iterators to implement a shift of elements forward, but not in=
 all cases. It is also less efficient; see<span class=3D"Apple-converted-sp=
ace">&nbsp;</span><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/s=
td-proposals/I76om68B3t0/25bGu7O6AwAJ" class=3D""><span style=3D"-webkit-fo=
nt-kerning: none;" class=3D"">https://groups.google.com/a/isocpp.org/d/msg/=
std-proposals/I76om68B3t0/25bGu7O6AwAJ</span></a><span class=3D"Apple-conve=
rted-space">&nbsp;</span>and<span class=3D"Apple-converted-space">&nbsp;</s=
pan><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/I=
76om68B3t0/SPTeZdofAQAJ" class=3D""><span style=3D"-webkit-font-kerning: no=
ne;" class=3D"">https://groups.google.com/a/isocpp.org/d/msg/std-proposals/=
I76om68B3t0/SPTeZdofAQAJ</span></a>.</span></div></div><div class=3D"">&nbs=
p;</div></div></div></div></div></blockquote><div><blockquote type=3D"cite"=
 class=3D"">=E2=8B=AE</blockquote></div><div><br class=3D""></div><div>&nbs=
p; &nbsp; &nbsp;=E2=80=98In some cases=E2=80=99 usually implies =E2=80=98bu=
t not in all cases,=E2=80=99 but, yeah, that reads well enough to me. &nbsp=
;</div><div><br class=3D""></div><div><blockquote type=3D"cite" class=3D"">=
=E2=8B=AE</blockquote></div><blockquote type=3D"cite" class=3D""><br class=
=3D""></blockquote><blockquote type=3D"cite" class=3D""><div class=3D""><di=
v dir=3D"ltr" style=3D"font-family: Helvetica; font-size: 14px; font-style:=
 normal; font-variant-caps: normal; font-weight: normal; letter-spacing: no=
rmal; orphans: auto; text-align: start; text-indent: 0px; text-transform: n=
one; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-str=
oke-width: 0px;" class=3D""><div class=3D"gmail_extra"><div class=3D"gmail_=
quote"><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex=
; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(=
204, 204, 204); padding-left: 1ex;"><div style=3D"word-wrap: break-word;" c=
lass=3D""><div class=3D"">&nbsp; &nbsp; &nbsp;Second, you might wish to ree=
valuate your use of fonts: &nbsp;some function names referenced within part=
icular sentences are not in code font when they should be. &nbsp;</div></di=
v></blockquote><div class=3D""><br class=3D""></div><div class=3D"">Done.</=
div></div></div></div></div></blockquote><div><blockquote type=3D"cite" cla=
ss=3D""><br class=3D""></blockquote><blockquote type=3D"cite" class=3D"">=
=E2=8B=AE</blockquote><br class=3D""></div><div>&nbsp; &nbsp; &nbsp;Again, =
glad to be of service. &nbsp;</div><div><br class=3D""></div><blockquote ty=
pe=3D"cite" class=3D"">=E2=8B=AE</blockquote><blockquote type=3D"cite" clas=
s=3D""><div class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica; fo=
nt-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; orphans: auto; text-align: start; text-inde=
nt: 0px; text-transform: none; white-space: normal; widows: auto; word-spac=
ing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><div class=3D"gmail_e=
xtra"><div class=3D"gmail_quote"><div class=3D"">&nbsp;</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: =
1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); paddi=
ng-left: 1ex;"><div style=3D"word-wrap: break-word;" class=3D""><div class=
=3D"">Other than these concerns and those parts of your proposal which you =
have yet to fill in, the document hosting it looks good so far. &nbsp;</div=
><div class=3D""><br class=3D""></div><div class=3D""><div style=3D"letter-=
spacing: normal; text-align: start; text-indent: 0px; text-transform: none;=
 white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=3D""=
><div style=3D"letter-spacing: normal; text-align: start; text-indent: 0px;=
 text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: b=
reak-word;" class=3D""><div style=3D"letter-spacing: normal; text-align: st=
art; text-indent: 0px; text-transform: none; white-space: normal; word-spac=
ing: 0px; word-wrap: break-word;" class=3D""><div class=3D"">Regards,&nbsp;=
</div><div class=3D"">&nbsp; &nbsp; &nbsp;Bryce Glover</div><div class=3D""=
>&nbsp; &nbsp; &nbsp;<a href=3D"mailto:RandomDSdevel@gmail.com" target=3D"_=
blank" class=3D"">RandomDSdevel@gmail.com</a></div></div></div></div></div>=
</div></blockquote><div class=3D""><br class=3D""></div><div class=3D"">Tha=
nks!</div><div class=3D"">Dan&nbsp;</div><blockquote class=3D"gmail_quote" =
style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-sty=
le: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><span=
 class=3D"gmail-"><div class=3D""><br class=3D"webkit-block-placeholder"></=
div>--<span class=3D"Apple-converted-space">&nbsp;</span><br class=3D"">You=
 received this message because you are subscribed to a topic in the Google =
Groups "ISO C++ Standard - Future Proposals" group.<br class=3D"">To unsubs=
cribe from this topic, visit<span class=3D"Apple-converted-space">&nbsp;</s=
pan><a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposals=
/I76om68B3t0/unsubscribe" target=3D"_blank" class=3D"">https://groups.googl=
e.com/a/<wbr class=3D"">isocpp.org/d/topic/std-<wbr class=3D"">proposals/I7=
6om68B3t0/<wbr class=3D"">unsubscribe</a>.<br class=3D"">To unsubscribe fro=
m this group and all its topics, send an email to<span class=3D"Apple-conve=
rted-space">&nbsp;</span><a href=3D"mailto:std-proposals+unsubscribe@isocpp=
..org" target=3D"_blank" class=3D"">std-proposals+unsubscribe@<wbr class=3D"=
">isocpp.org</a>.<br class=3D"">To post to this group, send email to<span c=
lass=3D"Apple-converted-space">&nbsp;</span><a href=3D"mailto:std-proposals=
@isocpp.org" target=3D"_blank" class=3D"">std-proposals@isocpp.org</a>.<br =
class=3D""></span>To view this discussion on the web visit<span class=3D"Ap=
ple-converted-space">&nbsp;</span><a href=3D"https://groups.google.com/a/is=
ocpp.org/d/msgid/std-proposals/344B1400-86F7-4D11-A7B0-ABB44D5AF397%40gmail=
..com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" class=3D=
"">https://groups.google.com/a/<wbr class=3D"">isocpp.org/d/msgid/std-<wbr =
class=3D"">proposals/344B1400-86F7-4D11-<wbr class=3D"">A7B0-ABB44D5AF397%4=
0gmail.com</a>.</blockquote></div></div></div></div></blockquote><br class=
=3D""></div><div>&nbsp; &nbsp; &nbsp;Again, you=E2=80=99re very welcome. &n=
bsp;</div><div><br class=3D""></div><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; t=
ext-align: start; text-indent: 0px; text-transform: none; white-space: norm=
al; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-w=
rap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-=
space;" class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: norma=
l; orphans: auto; text-align: start; text-indent: 0px; text-transform: none=
; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke=
-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-=
break: after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); le=
tter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; t=
ext-transform: none; white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><div class=3D"">Re=
gards,&nbsp;</div><div class=3D"">&nbsp; &nbsp; &nbsp;Bryce Glover</div><di=
v class=3D"">&nbsp; &nbsp; &nbsp;<a href=3D"mailto:RandomDSdevel@gmail.com"=
 class=3D"">RandomDSdevel@gmail.com</a></div></div></div></div>
</div>
<br class=3D""></body></html>

<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/B003EA60-F9B0-480A-9C1B-F40F2881621B%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/B003EA60-F9B0-480A-9C1B-F40F2881621B%=
40gmail.com</a>.<br />

--Apple-Mail=_043565F1-B467-4D2E-807F-427BCB55FD96--

.
