220 33432 <5894BCEB-596E-4B45-B47C-0D5011F51D87@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: [idea for proposal] Adding std::shift to <algorithm>
Date: Fri, 28 Jul 2017 23:50:10 +0300
Lines: 45
Approved: news@gmane.org
Message-ID: <5894BCEB-596E-4B45-B47C-0D5011F51D87@gmail.com>
References: <bd1a5d3b-ccc1-44ab-91cc-a4d7195c9dc3@isocpp.org> <3e77c029-bc79-424c-bdad-eba28ec10cdb@isocpp.org> <94CDFCD7-3F9D-4D7E-BDD7-58D27561C291@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (1.0)
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1501275017 15814 195.159.176.226 (28 Jul 2017 20:50:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Jul 2017 20:50:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5YJREBWAGRBBWH53FQKGQEHMCVAKY@isocpp.org Fri Jul 28 22:50:11 2017
Return-path: <std-proposals+bncBC5YJREBWAGRBBWH53FQKGQEHMCVAKY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5YJREBWAGRBBWH53FQKGQEHMCVAKY@isocpp.org>)
	id 1dbCD4-0003k0-FB
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Jul 2017 22:50:10 +0200
Original-Received: by mail-wm0-f72.google.com with SMTP id h126sf14392353wmf.10
        for <gclcip-std-proposals@m.gmane.org>; Fri, 28 Jul 2017 13:50:16 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501275015; cv=pass;
        d=google.com; s=arc-20160816;
        b=scD9vgNP3njj1FWSTc8hGkQndnPOcwUpbwdcksWRZL6LV5PQ46FvDtSkOGXINn8NNE
         rqYSCzTS/wPs9PonQcb6BxVtPhrsq7zLVK1+9T15khkNNndnNCPAgKpOxLqgGCXiJE3R
         r8UhP+yNn/TgcjVFX3YksFn7DJ6dbzd9kg9kgUpVHSwho31lkiudEYuWU00G3i3x4ZA7
         K2fpuerao+5bKauqXOT/otlbvVTOSSFoiLgdhhpCFxhyLazx5RugTek136D5Eiqgo3nf
         oYcsHfhtCjk5L/SWYXaqYFoh0YTrZJ8u0gzcJBBARR4RxnHwNKeaJXnaig7RmvvmHRN4
         WkoQ==
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:in-reply-to:references
         :message-id:subject:date:mime-version:content-transfer-encoding:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=6Yj647J2IJj8rF1aEu7DxSuY52QCBffLR/mLkb0ddSU=;
        b=BGriq4/bV/bz/Gvf4pdUNMWNAxhQFkW/xWHwOOQVvvd8FfLusJNu8nsJw4lr+eovgI
         t+4ngtXL4DRjTLCoHZlgbzInoGrhmJYckWWCXfcs/piYLoBbL+H/C3jGJpKT5+DHF55R
         otu5TTZFcz5oVXVDyOyauyFRxrjAkB7ORyU9GCMoDuXKE99ZKti1xDpwwZPWyNVqVkta
         qAZ+KizKQAp01CXvX9QBTyZAMGCUdVrWUvAneHGlxzyX6QK68621RxVaYzc3NfxC2loN
         zA16V6MklWNm3jg9odbsHldj/IQNJRfrIjWE4dvK1eg0gOBxkB+E2Zao4OGRhV7HgjjG
         ofhw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=QLnpFqpL;
       spf=pass (google.com: domain of dan.raviv@gmail.com designates 2a00:1450:400c:c0c::244 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=from:content-transfer-encoding:mime-version:date:subject:message-id
         :references:in-reply-to: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=6Yj647J2IJj8rF1aEu7DxSuY52QCBffLR/mLkb0ddSU=;
        b=FzxREN3My5wsDGj8DM4rqK6A0zs1P6DUzw6F84zY1kZB50qOFxCRFR2NgW3lK8rchv
         kNFrmeJEbkCJPEdFWSm+b5b6FfNrTNKZ8FVqKoRakOkz71OXNrLNEDhhdHy0O7hqi5g8
         rW4fRLGte7DQfORlwLFCeVMi06uIR91Ru/Z/gDT/50irKMrgaaGgSo+HumG/HjzpVLsy
         UxVb5PDVVbYK9AoyJ3ChRl2xsnagbbQ+mFzDYfpmpSsbfTYsjRXPb9VWpxnJKUxgVZO7
         PxVO4Kz9Lw7lVj5nh3VKzJBhyffuTuE7w4WDuoTG2Lk5c1SPVJPQ+1rS2e3J2jUvFPzE
         qHlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:content-transfer-encoding:mime-version:date
         :subject:message-id:references:in-reply-to: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=6Yj647J2IJj8rF1aEu7DxSuY52QCBffLR/mLkb0ddSU=;
        b=GTxTFn05b2ZAJljIavB3OUYNWReSVvD/iDmyD8JqDejtVOqOPjiM0OIFevVx88xBff
         kNeqWxx8u0SMI+xzHXZe+EGZTH8ogiZ160jGc2laproFf/mL9sNBGpWcKVTB+f2NhPIP
         GJaWcPMKm+VsPrsG3ygNCsNZgr9iTqltjYpPLb3wpf62sVWm81bP+6F4nJFBX2WFVA45
         rD0+0CoeZJ4WyW8+Jrpo0VpwnAXq6yDwsBzd43eE5g6sfuAIdQ7kuKzukhzTY1v4w/1F
         VsVYBGVtYXkmBypDde9y89tgQtH4/KGKXSqYFUHOvb8WvPQqyJJPaGH9ijfC0yTmvFYF
         8Jj 
X-Gm-Message-State: AIVw112YVr3VRlGithOaAGr9m8QSQzKG6lIHpBrNy+iAPteEynUCI8RB
	dcuAMXKqZquGimUw
X-Received: by 10.28.0.210 with SMTP id 201mr448121wma.21.1501275015861;
        Fri, 28 Jul 2017 13:50:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.174.83 with SMTP id x80ls1155048wme.17.gmail; Fri, 28 Jul
 2017 13:50:13 -0700 (PDT)
X-Received: by 10.28.23.11 with SMTP id 11mr6767880wmx.125.1501275013819;
        Fri, 28 Jul 2017 13:50:13 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501275013; cv=none;
        d=google.com; s=arc-20160816;
        b=AXJa9GQwE8ZlKsgZ2OuLjvACr/SruOD+N/MThr55a/JLAwMwuYNly002J/zg+vxxgn
         L4uJrKvF/EdVdRZn/VqeEyEiIrqs+1sHOsEOeXKKUGXSinA7hnjAx2ALVtqaOSGqAAuC
         XQpe7b43fodxtPAEzaAAODp9vj1cXYH8UHitzov2UE2NkeVuf7fWdhNBOEdDroJaQ9sn
         ErBADJrOUaFpZIX1mXcU00S9EHARUqiJGwbmA6DvoaVZaBFo/kzyViqDLYIX8ShuQnYr
         7a6VZ1XWI2H1pXxLxv0OFd2YVsm6aH9ZP+Idp8635A2uZkLFaMJmuEYpprx6CD9Tylvf
         FUbA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:in-reply-to:references:message-id:subject:date:mime-version
         :content-transfer-encoding:from:dkim-signature
         :arc-authentication-results;
        bh=PdNKfQBb2h86oBMvzLXOsDh0I4ivGe199VgsynvwdAY=;
        b=bzy6c6a5kUQokpL7H5fSBEBYURBoNvboeQXo+Xxs79MM5dTOJ88jub5N3uYCCxkFsr
         /Wp2uFu5+6w2acdl0C2xBWUhDguAVkQOd1+UivA6c9nrqkG+VNv8mt23izMalJLYoyj8
         K93m5iK/ZJot0/rV6r+pOAmpaJvXp5tAti1FKUuo36wElXsvR4pqq4YY1Pij7pCjJ1Ac
         01XOoUMf6zHT+MoPnkSKDkYdZpmSEAwDJnE5hWHslJqZZyUcbad2lo7HlPZmyBZgvAhQ
         WnZH0RJ2xsDgbYyUjE9N7QTftHVe+mxlbf2eoGafQwEMopgHG31NzspBlH7Vn/WEtQv8
         fvgQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=QLnpFqpL;
       spf=pass (google.com: domain of dan.raviv@gmail.com designates 2a00:1450:400c:c0c::244 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-wr0-x244.google.com (mail-wr0-x244.google.com. [2a00:1450:400c:c0c::244])
        by mx.google.com with ESMTPS id 7si18548392wrd.171.2017.07.28.13.50.13
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 13:50:13 -0700 (PDT)
Received-SPF: pass (google.com: domain of dan.raviv@gmail.com designates 2a00:1450:400c:c0c::244 as permitted sender) client-ip=2a00:1450:400c:c0c::244;
Original-Received: by mail-wr0-x244.google.com with SMTP id y43so27271312wrd.0
        for <std-proposals@isocpp.org>; Fri, 28 Jul 2017 13:50:13 -0700 (PDT)
X-Received: by 10.223.132.2 with SMTP id 2mr7975103wrf.69.1501275013133;
        Fri, 28 Jul 2017 13:50:13 -0700 (PDT)
Original-Received: from [192.168.1.6] ([141.226.165.147])
        by smtp.gmail.com with ESMTPSA id 82sm5300733wmt.17.2017.07.28.13.50.11
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Jul 2017 13:50:11 -0700 (PDT)
In-Reply-To: <94CDFCD7-3F9D-4D7E-BDD7-58D27561C291@gmail.com>
X-Mailer: iPhone Mail (14G60)
X-Original-Sender: dan.raviv@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=QLnpFqpL;       spf=pass (google.com: domain of
 dan.raviv@gmail.com designates 2a00:1450:400c:c0c::244 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:33432
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33432>

I see.

Then, isn't there a need for, e.g., an std::rotate_right function to augmen=
t the existing rotate(_left) algorithm, since rotating right can only be ac=
hieved through using reverse iterators? Or is the existing std::rotate desi=
gned so it can optimize for reverse iterators as well?

Thanks,
Dan

> On 28 Jul 2017, at 22:19, Howard Hinnant <howard.hinnant@gmail.com> wrote=
:
>=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::move=
_backward() to <algorithm>? It seems that using std::move() with rbegin(),r=
end() 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
> --=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/94CDFCD7-3F9D-4D7E-BDD7-58D27561C291%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/5894BCEB-596E-4B45-B47C-0D5011F51D87%40gmail.com=
..

.
