220 33437 <DBD8279E-AB79-41D0-89D9-0695AF7A5D7D@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:57:01 -0400
Lines: 58
Approved: news@gmane.org
Message-ID: <DBD8279E-AB79-41D0-89D9-0695AF7A5D7D@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>
 <C3F75EBD-7569-42EF-8F26-04CC0077238E@gmail.com>
 <EE992B88-A216-40CF-9C22-D95FA2AE3A09@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=_970DBBD2-DC67-43C8-81F6-5053ADAE2002";
 protocol="application/pgp-signature"; micalg=pgp-sha256
X-Trace: blaine.gmane.org 1501279029 26832 195.159.176.226 (28 Jul 2017 21:57:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Jul 2017 21:57:09 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERBMPG53FQKGQEGYTQ2XY@isocpp.org Fri Jul 28 23:57:03 2017
Return-path: <std-proposals+bncBCK2HM4L6YERBMPG53FQKGQEGYTQ2XY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f69.google.com ([209.85.214.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCK2HM4L6YERBMPG53FQKGQEGYTQ2XY@isocpp.org>)
	id 1dbDFk-0006Zs-TK
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Jul 2017 23:57:01 +0200
Original-Received: by mail-it0-f69.google.com with SMTP id w204sf210944127ita.13
        for <gclcip-std-proposals@m.gmane.org>; Fri, 28 Jul 2017 14:57:06 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501279026; cv=pass;
        d=google.com; s=arc-20160816;
        b=HsoM4VVP/COD0fonhJoSf8iTwZuwO+0jWiFe2uqFYFfMnZ0ztIKcHP1ke4a8yHuCdn
         ys4SfyH9vfqlSu34vtfUdwmlAo3UrnRaQcgjQ1kVSrbrH7eyHoQGgsVRLyo/dJR55Fy+
         dAhJCRI3Jf+kLB7JkpPmDLVgxl0wYQIx3DjDj59J3nnTxtF7pXEfLqlM11FTzK2vstB7
         0cU6snzRqZP/PzZlJDytNHQ+ClDuysPTRUzFYWwIfbXvbZzbZ7z+G/2R0zXJ1XA0ZAwH
         rNtPRTR3bUglKCd1UStpYnWvln0brkdxpPsIguCulGXVc2UjsuNnko2QcM4QeP820nfo
         /A8A==
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=d/DV9zuMPG20RxhJ6WLOR/QJdJy7uIqENjYB50uzkOY=;
        b=MqSBekrmHZZFXyHoyzcJ2EsfxmCEpHEGm17zpW8uivg4qmbRziAvIeVryVrxMouLBP
         ljnVWXlnsq3Ac5vVeBEdeMnDlScTd8o2i21VMjOEJfJ/lh7A4L1tzYc1/nPrKjRSeBuq
         TYtTbXLJ5JDKGP27Gpz0vI3wUNd3k2uORdcQZmxU1MP68pjNQPfT8ZsEacuRcLVRK2ec
         dlymL9jVENbO9LFha1/kK1mP7GG0uDMZC3hGWyuLtlB+rjQLZcdqh/wIw3Z7ZHSNIwuj
         TyDkwEU5k8pIxa34aHPfaKoqbxD6uw5DMqqlscJIE6Rln9VVq6Nl7GdZOic/PdAA7sI0
         ivbg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=Iz5LNQWJ;
       spf=pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::231 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=d/DV9zuMPG20RxhJ6WLOR/QJdJy7uIqENjYB50uzkOY=;
        b=L4S+KS+GQSLaZX7oIujdTaztB8FAi9NCN7n3g08WNdP/fKGBw6uwLYtXvERhIvcLRq
         e2tzNJOrBBStp0ycpOLvw6KWtGf8/20rdTg2Ko/BRE8DAUOrU7u7YFmhOQUlNb5Iy9U5
         TH++MnBHaLLy3IdgSYDGZXKpFGhhxV7rAT96Q7WddXsUleTqXO7Rh6Nd0adlmBvxcqgX
         QQxOXmgAnmvz+FmbA17vgbhxiLHja32wEpxVSgPo6oo65uLe3KwI6fs1QOZcDpwltxNZ
         xrHQuntvJJSWzWtzID/gDLrJb+LyKqp6IvcLqzMcK271oHlhrskzHIq38Qt8aE4mbbnG
         /r6g==
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=d/DV9zuMPG20RxhJ6WLOR/QJdJy7uIqENjYB50uzkOY=;
        b=RHSb8Vm1jdErjAYIud4z7cn2U6mL9iqAlDutFMTjmZbMzy4H/MrxmF7ZyHcIpGNshk
         ERHUXFYoQuvpMM8S0P6Vknz0mF2/XeLfoTo6XWSDUWIdgFJfSuMkmZAza6MvWNIPHvy1
         I8gnQ/9InQhZfEqX1ayL5JgLPdC76rNycqrH1OL2bQIP3Nj+wUhkv7cVrIEnEpa7zp1G
         zOgUelMlJFndnKhrFdJ0+k7LUGTorMnIGfw/ghO5K4ROwevZsFrshPSFrN720ptIoEra
         pZTXhe4a7S3Ckl+OkVe/v4ZFOUXF+klgFwrYi8S9dr2PAoeVEFdb5sXQna7/Z6T7+oVR
         KmPg==
X-Gm-Message-State: AIVw112oEC1j9JLsvxOins/rvtfIiTb2TG+ASu768Yo2t7zdny7g9GII
	mDU2ywiaijraqdzr
X-Received: by 10.107.27.2 with SMTP id b2mr6083637iob.29.1501279026357;
        Fri, 28 Jul 2017 14:57:06 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.131.200 with SMTP id n69ls652779ioi.16.gmail; Fri, 28 Jul
 2017 14:57:05 -0700 (PDT)
X-Received: by 10.36.91.146 with SMTP id g140mr10740992itb.70.1501279025046;
        Fri, 28 Jul 2017 14:57:05 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501279025; cv=none;
        d=google.com; s=arc-20160816;
        b=tamzy15s7wUDrC1YFMGd9rZ+oK3hWQd3Mv3uYqjRFAVZD3L2XkOWMS/LY/oTiXlnOS
         PbNxdxtWQsn3UrHDTmmOhh52KJu/UFBM2XDVvdMegM86kgtLiadG9qtcgmA57sUQ9OFi
         dnGCCFKtpmno8ZyDsuhKbMDFV6/mLCtcKK1ldYav788qTU298+F2T3OZwY7etlB2fYef
         kfBcuLAXbf4NaHJC9YHUrmErthvZFsxwoMFqmZiCzsBXgayfSaayA9wWNHYnjEeCiyHE
         rMWtQdyuuhQSFijFgLnFtEma+EU8GACXVANOqa2XbVKwoFbvTDodVmbaMfMg4U8+Wo7x
         Owmw==
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=9HPtACbewSXJNjaORHiILkH5/axvhdxVIzIz/iub8v0=;
        b=f5jKT5rIPHhx2JQyhCyS+Rxfzba5teJ5cgEPOYsP/jQNttcaKqvpP6Z+tPlyxxIi3s
         3dmHTW5yZEYmtLUjRAG3M2e/xeP9Hw3J8nEasTtFnyMbajG5OA8PckbRy2TCCy/Sn8DX
         85TTtqoRTaHj641wZeA/31yRhRQdxJ1K6g0JaTPD9y5bglA9jsi9fVaUcFy/Z7AlImIl
         N+GySOfHG5+CiI3ldpTxWVcvXe3dW2Wni+RmcV1X0jHTTLoxVUB6tzmbXyqelguyZjqK
         vfoy08vj5qfVHk0SAEhPjQDU9ePy2xtrBct+6Q1cJleVZVQPErLv5EEdiQi36FQGrK7Q
         WQfQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=Iz5LNQWJ;
       spf=pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::231 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-x231.google.com (mail-it0-x231.google.com. [2607:f8b0:4001:c0b::231])
        by mx.google.com with ESMTPS id m63si18221972itc.174.2017.07.28.14.57.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 14:57:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c0b::231 as permitted sender) client-ip=2607:f8b0:4001:c0b::231;
Original-Received: by mail-it0-x231.google.com with SMTP id v205so86863068itf.1
        for <std-proposals@isocpp.org>; Fri, 28 Jul 2017 14:57:04 -0700 (PDT)
X-Received: by 10.36.53.141 with SMTP id k135mr10485648ita.176.1501279024115;
        Fri, 28 Jul 2017 14:57:04 -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 d72sm10509353iod.46.2017.07.28.14.57.02
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 14:57:03 -0700 (PDT)
In-Reply-To: <EE992B88-A216-40CF-9C22-D95FA2AE3A09@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=Iz5LNQWJ;       spf=pass
 (google.com: domain of howard.hinnant@gmail.com designates
 2607:f8b0:4001:c0b::231 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:33437
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33437>


--Apple-Mail=_970DBBD2-DC67-43C8-81F6-5053ADAE2002
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

On Jul 28, 2017, at 5:45 PM, Dan Raviv <dan.raviv@gmail.com> wrote:
>=20
> Ok, so why the need for copy_backward in addition to copy (since copy cou=
ld be used instead with reverse iterators/pointers)? Is this mostly an opti=
mization issue, as Nicol says? (I guess so because it seems he is always co=
rrect) :) But it would be great to get your perspective on this too Howard.

copy_backward predates my participation in the standardization process, and=
 I would prefer not to speculate.

I do note that the code gen using the latest clang at -O3 is much worse for=
 copy+reverse_iterator than for copy_backward using int* as the base iterat=
or.

Howard

--=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/DBD8279E-AB79-41D0-89D9-0695AF7A5D7D%40gmail.com=
..

--Apple-Mail=_970DBBD2-DC67-43C8-81F6-5053ADAE2002
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-----

iQIcBAEBCAAGBQJZe7MuAAoJEGbcHCxKqhWCAk0QAKmOlUsBHRftMlu0u37pUCTT
gJWtkCLZzvwt7pdcxUf/ygmHxAbzzDocOw1ZlBb1Z+5om7ai49PLLb5sJ/QB8dSP
AM4BBwqaqUEiBr3RD6p9OsNT4AEbRmwqchgoA5m9kWlmT0xyFfLMk1PgmdWxzOyu
Sl/i1irDX+Ffc6Yk80VUpNssPu//jACIyCdNfxAoZ4dC79xpmbjsdQrwceTbt+uD
IhQeefOAq478mHUFPMPsXWXgIdVqEo6qQTF9GMobG/a+2uOYm2NBBJnXS7ZwcaPD
txvp7cVg+BSM+fW0CetQBjMKJwzZ3OBwpPg/2r9fkpeMhrzZJuO257WLFCDpD3OY
hngXGpF/PJGk5Ubvl8wTqHsZZAJppTcpqdW2JiTRkFAY5D9cmOf0z/a59Xs7/pEj
1ETizyxgvHlAVdPj++V1LTFtzqFK4+Ts35+msjSn61CK26dfr2UwRK9OYMXujitB
FX1eiQxwsKj+ylNic1S+CxOdZdlyJ6rRlC1JeO0LCWaFVZIi7zjGVNMN+oHbH815
9lHmI7hE3WpsUdiDqiSey88udWPa+YDa7a1Dtr+5FpLHjQ0Xl7kDGEtwGoM67s3B
BZSVnIUSGrodc7Yqc1Kgnth2ftbl7O5HXFDVS2OljeioQIHMVBDSfbYbQ7x3qnv7
5+fCzs8BUUJ1DPxs/dRt
=kJrx
-----END PGP SIGNATURE-----

--Apple-Mail=_970DBBD2-DC67-43C8-81F6-5053ADAE2002--

.
