220 33435 <C3F75EBD-7569-42EF-8F26-04CC0077238E@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Howard Hinnant <howard.hinnant@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: [idea for proposal] Adding std::shift to <algorithm>
Date: Fri, 28 Jul 2017 17:15:58 -0400
Lines: 99
Approved: news@gmane.org
Message-ID: <C3F75EBD-7569-42EF-8F26-04CC0077238E@gmail.com>
References: <bd1a5d3b-ccc1-44ab-91cc-a4d7195c9dc3@isocpp.org>
 <3e77c029-bc79-424c-bdad-eba28ec10cdb@isocpp.org>
 <94CDFCD7-3F9D-4D7E-BDD7-58D27561C291@gmail.com>
 <96DEA673-B79C-4D08-AE8E-EFFCA3C5A0E8@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Content-Type: multipart/signed;
 boundary="Apple-Mail=_EF26E42D-57C7-4431-A0D3-E926ED4E8C95";
 protocol="application/pgp-signature"; micalg=pgp-sha256
X-Trace: blaine.gmane.org 1501276567 14507 195.159.176.226 (28 Jul 2017 21:16:07 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Jul 2017 21:16:07 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERBEOT53FQKGQEMH5JT4A@isocpp.org Fri Jul 28 23:16:03 2017
Return-path: <std-proposals+bncBCK2HM4L6YERBEOT53FQKGQEMH5JT4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f69.google.com ([209.85.213.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCK2HM4L6YERBEOT53FQKGQEMH5JT4A@isocpp.org>)
	id 1dbCc0-0003HE-JH
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Jul 2017 23:15:56 +0200
Original-Received: by mail-vk0-f69.google.com with SMTP id g189sf10718470vke.9
        for <gclcip-std-proposals@m.gmane.org>; Fri, 28 Jul 2017 14:16:02 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501276562; cv=pass;
        d=google.com; s=arc-20160816;
        b=IdMAlLMsrmPutafw20TP6ZyVFh3lTsxwB7140SZD2wvorOEYonKh2co6gMZZFB+LpS
         Iq4aqA+4Tovt/CvyrcdP2mfqo4eVRCkVAYGVxKEfsTpTCuLpI8xa1pSaHFet3ewHGNgA
         OmlXJO+4nBIvbmUM7QRJ3RAmO5JpYqllPuNwkCh5XEqGPrMu5nV0HX3IeupFp049TvrH
         s26J0/qUqrj0k5J0GKHNLzPGvo+vQt9F8bcg8MCzzFLC94L/ZXaF5ehkJsA9ReKVHvgR
         4NtzfI2fHwWtbUkX2r3riaLuP2whV7x1FTJWHuXj86TKWuVSgowJehV1fFv+C4tq6skg
         QOJw==
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:message-id:in-reply-to:to
         :references:date:subject:mime-version:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=6xJ2Z6Yaqs7KJS2QgIF1iZkF/l0oCjqFa7dfY+797aI=;
        b=wjFANhAm73mwTifIyWOTRpbHEhfsNZLGOiHtymHQ3SsP5pxQNg2pxOZT/dt8ptSL0r
         C7Co8mErsdkFMdn6qnrs2NVhGhu5gO/7uY8O7M+qcvggjlt8k+R8O/dGSUYPMcw+yXex
         PvngLo+IOW2va9N3PCo+AHoDG99A/zuCj6W0E9TVyeUc+qvq1ei5grcJH6l30OptGx3+
         eDFNjRXSpLFejR7uX86RupOHQ9xfCH08nThOwAOsGS1MZ3jl0y0QG3FnJwetIN5FC2KW
         wha+R2ed4ZK1WAkLjvSw9rw1gLZ1F1ejo9qwagMgWR9SkciioiKV02l1rPB1wt4+U05d
         HgGg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=fBO47Pty;
       spf=pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::22b as permitted sender) smtp.mailfrom=howard.hinnant@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:date:references:to:in-reply-to:message-id
         :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=6xJ2Z6Yaqs7KJS2QgIF1iZkF/l0oCjqFa7dfY+797aI=;
        b=rMLjFrtQ9rOBYk2pHxf17RfI0prcNCnCVFDmORrbgyQiCCqXoIuWXga1LpHvIBOBEF
         Q4TNHMMCWAV/zvgYR19EUp7jhFA7/7rUZDe+0p4wOx6TEJdQRMNp+cjwyXwAC/k5CNP/
         OmHibhyIt56KjjkAneAIYAm8hq0EssC9HWD+3WhL4xeIR+jXBlZ0toVPJ48AquqdiZx0
         cs31E68LRSpQj6tNct59XlAx9fHnLHOrIiG2OLPAjFBA+HMSOPbJncYL2zI4/1R2cKdX
         v2EE7p7WfimScHWwTSnekiFNsTMTKma7aiFakOpWKzgG7kuJT6XP63Fz/1SoXFRvvXQx
         fU8g==
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:date:references:to
         :in-reply-to:message-id: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=6xJ2Z6Yaqs7KJS2QgIF1iZkF/l0oCjqFa7dfY+797aI=;
        b=ipOebHs1oT4jDICQ9Sx/UWYokFV+GT5UklQJywasVmgMO3XmA49KybsU9dA8MqpjiD
         Cx5X1+XSgMIwhagZvyJuz7+PHB+195sOTz81Q41N4JDuFKG0aUQYeJM6wOdtTC9dAKvy
         vVYOF6aDURk5KD/pHMRZVC9+pYMsDpjJk3St57ujw+cVtCSAbzD9V4TGXBLBWZ2h+Rni
         zy2AYzsx070RxeJzJYnNHaoGJIjSjci+8QSJPMxSE7d/GF1Kw0mclL6qC3ZIlcQZDkzb
         N99uFkUln7Cx+Bd7g/L4+i7DgVA2XIIGwVL4Bwu9b+wkg3suIXAoVh51lxzYIUOr9znx
         GP0A==
X-Gm-Message-State: AIVw112yQuoGZtrKMDPLBpFNqBItHWJZ2QM549L9X6ub2P2ZjOxQMaLv
	jemhVgeXvyPokhxl
X-Received: by 10.176.18.107 with SMTP id s43mr6011989uac.41.1501276562260;
        Fri, 28 Jul 2017 14:16:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.18.214 with SMTP id 83ls5057134ios.42.gmail; Fri, 28 Jul
 2017 14:16:01 -0700 (PDT)
X-Received: by 10.36.131.10 with SMTP id d10mr11162181ite.126.1501276560974;
        Fri, 28 Jul 2017 14:16:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501276560; cv=none;
        d=google.com; s=arc-20160816;
        b=xCkLusutc7Ap6Cv3lCZaP6CE7fO+B9RkjT8PwwHYGfDRHNOuQhme3RNviONEtgRogF
         mDwbqDpeoNincBvjF9XnkMs4Jb/7i0D6Zq/20Mjf1NbQeLZn6z2zvILle45N/5ybqyjS
         GejBFK/pCRapMocqzK8QqakMxqSxyHIKXl8Y1y6xiA+osP1GwWFpKpYWdv9scNRN5nvw
         RZPZ2DJzA/wZeL7NyXS54fEvP0jEkvRAV+9n19y4VFjSMrGNRuOuTIpz1620WyIShveJ
         7BmKJvF0/gSbiWkCljqS1ANNXg6sdMz6sWUbdx1u9J/J/VVFkfnZOMjHWUtyS+IWArhL
         /LpA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=message-id:in-reply-to:to:references:date:subject:mime-version:from
         :dkim-signature:arc-authentication-results;
        bh=KBT4OPjJS1DJl3WjPgbfGeUscsOpiPYD9CS2crmzG4Y=;
        b=hyB3YbCngYy565zgBJGKFtL1t1a4S4EfRaiR21uiMNXJhD9tjvXhreZNMKo/2cW1El
         2uWnh83oRDpGpJsGyjouIqfXc/BCDZNfLZTb5oOslofIXMTEGjU1o2qlZsAv2TbmIj03
         RdjmjMfNbzqdG+uopp9uqiMnYVsNgm6MG2Qkb82El2AIz3sXLfETBRr9YM+CPc3uaoD3
         S/hgipmj+1mnKmIw84gc5HMuXI+VrbEy1EvZ5k5Cyf5JvXCVrreBACBh8UC1Hc6O8C9G
         UV9EZsZ/MMxXdAGOOVMaF6kqS4eDfOP5L1TeJQiQb4Hq5WZYvbNbc0+MIrGhjpv2QVDc
         tHNg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=fBO47Pty;
       spf=pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::22b as permitted sender) smtp.mailfrom=howard.hinnant@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com. [2607:f8b0:4001:c0b::22b])
        by mx.google.com with ESMTPS id y7si17479992itd.62.2017.07.28.14.16.00
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 14:16:00 -0700 (PDT)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::22b as permitted sender) client-ip=2607:f8b0:4001:c0b::22b;
Original-Received: by mail-it0-x22b.google.com with SMTP id h199so102946867ith.0
        for <std-proposals@isocpp.org>; Fri, 28 Jul 2017 14:16:00 -0700 (PDT)
X-Received: by 10.36.248.132 with SMTP id a126mr10598684ith.0.1501276560601;
        Fri, 28 Jul 2017 14:16:00 -0700 (PDT)
Original-Received: from [10.0.1.2] (cpe-67-241-68-255.twcny.res.rr.com. [67.241.68.255])
        by smtp.gmail.com with ESMTPSA id w79sm1172025iod.20.2017.07.28.14.15.59
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 14:16:00 -0700 (PDT)
In-Reply-To: <96DEA673-B79C-4D08-AE8E-EFFCA3C5A0E8@gmail.com>
X-Mailer: Apple Mail (2.3273)
X-Original-Sender: howard.hinnant@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=fBO47Pty;       spf=pass
 (google.com: domain of howard.hinnant@gmail.com designates
 2607:f8b0:4001:c0b::22b as permitted sender) smtp.mailfrom=howard.hinnant@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:33435
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33435>


--Apple-Mail=_EF26E42D-57C7-4431-A0D3-E926ED4E8C95
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

From the paper:

> move and move_backward are two new algorithms to augment copy and copy_ba=
ckward. They require only that the value_type be MoveAssignable (recall tha=
t CopyAssignable types are MoveAssignable). Strictly speaking the functiona=
lity could be obtained with the combination of copy (or copy_backward) and =
move_iterator, however the anticipated frequency of use of these functions =
indicates that the syntactic convenience of these functions is warranted.

The last sentence applies to both of the new algorithms.

Howard

On Jul 28, 2017, at 4:51 PM, Dan Raviv <dan.raviv@gmail.com> wrote:
>=20
> It looks like that section mentions the addition of std::move_backward, b=
ut not the rationale for adding it in addition to std::move. Or am I missin=
g something?
>=20
> Thanks,
> Dan
>=20
>> On 28 Jul 2017, at 22:19, Howard Hinnant <howard.hinnant@gmail.com> wrot=
e:
>>=20
>>> On Jul 28, 2017, at 2:43 PM, Dan Raviv <dan.raviv@gmail.com> wrote:
>>>=20
>>> Does anyone know if there was a specific motivation for adding std::mov=
e_backward() to <algorithm>? It seems that using std::move() with rbegin(),=
rend() iterators (for the basic use case) would have the same effect.
>>=20
>> See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1771.html
>>=20
>> Section 25 - Algorithms library
>>=20
>> Howard
>>=20
>> --
>> You received this message because you are subscribed to the Google Group=
s "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n 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/iso=
cpp.org/d/msgid/std-proposals/94CDFCD7-3F9D-4D7E-BDD7-58D27561C291%40gmail.=
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=
 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/isoc=
pp.org/d/msgid/std-proposals/96DEA673-B79C-4D08-AE8E-EFFCA3C5A0E8%40gmail.c=
om.

--=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/C3F75EBD-7569-42EF-8F26-04CC0077238E%40gmail.com=
..

--Apple-Mail=_EF26E42D-57C7-4431-A0D3-E926ED4E8C95
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJZe6mPAAoJEGbcHCxKqhWC2RkQAIgLN3phuRTs6B9V8Wls+oAE
8z2IIsuuZFwtQipOrsGoNx8DMbC3EkfhZfRFMLy6XmRz5+Am6xhMiuxLoIH4Xz6N
BeakQa32xOOEMx2js+BBOcTALXWh9ZoUrXPqWhDS7NJKIlcJYq/xsyNZOClVRihN
u0J2c9sngHPQ2F5tFOpwvQVgq3Zj3ELQiP2R2sF2oZQW8+4rEljOMCve52zFoOpc
yl2tSv1q9Iaxqrgyl89pUSrZ22cmcRvLJgyiAuPkQsqClRYygzc0gcoz+7FYt9K3
tuPYmm+oJde17OFI47HjliP1BsL3bzcnV42Fz2Bh9jYyyMCGT+i/MHqAeiG56rRX
4GkPqUtR3TBLa/p6tMRyHZehbx3xlpmCni5ziGcGpF2h97XGT6WU5t51AiEokJCh
HpJvN5gDzwToI3OI4vERPXXCXZnstBqDXKcHDS/qaPLyY7QhbkWJet/TE3agXo+2
+kAqHQ13d3UgFYNelE0Ye9PK4hRUQBX0/kPwo4oUVNP5AS9cdvVwtLyjPb4arekJ
Sr0MBEnyhOIUcxAd3Wa/X6yur+b9Meu1EMKRLOtj3Te6d6zYq54GIurH69utjB3J
vBPPjECVPCuw/U6ONsgeQ5rgFKCpyzxJ21AwcKv/CrLSzogOTZg7h6MYLW0s1R8S
faWSuPrN6aHkiEw1/FrV
=8V8X
-----END PGP SIGNATURE-----

--Apple-Mail=_EF26E42D-57C7-4431-A0D3-E926ED4E8C95--

.
