220 33191 <df32b9a3-9215-4517-9bba-ba42654c55ee@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: [idea for proposal] Adding std::shift to <algorithm>
Date: Wed, 12 Jul 2017 12:51:23 -0700 (PDT)
Lines: 76
Approved: news@gmane.org
Message-ID: <df32b9a3-9215-4517-9bba-ba42654c55ee@isocpp.org>
References: <bd1a5d3b-ccc1-44ab-91cc-a4d7195c9dc3@isocpp.org>
 <a33d3e68-f629-4048-8716-418b5778d471@isocpp.org> <48819b6e-f08d-46b8-bc88-08d3640509a1@isocpp.org>
 <5666b7ac-b35e-4e9c-90ce-43a246b95f1a@isocpp.org>
 <CAJ7KwrNU1eo=CLR3D4WWywwWMLGWFzLtbHN+Qga_9GSArL0Apg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_24_184945050.1499889083880"
X-Trace: blaine.gmane.org 1499889094 16743 195.159.176.226 (12 Jul 2017 19:51:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 12 Jul 2017 19:51:34 +0000 (UTC)
Cc: jmckesson@gmail.com, dan@soundradix.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBPH3THFQKGQEWYOC37A@isocpp.org Wed Jul 12 21:51:28 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBPH3THFQKGQEWYOC37A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBPH3THFQKGQEWYOC37A@isocpp.org>)
	id 1dVNfM-0003fN-Hh
	for gclcip-std-proposals@m.gmane.org; Wed, 12 Jul 2017 21:51:20 +0200
Original-Received: by mail-yw0-f198.google.com with SMTP id d66sf24197924ywe.9
        for <gclcip-std-proposals@m.gmane.org>; Wed, 12 Jul 2017 12:51:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=iTgEpdloHrbwWCcZlTliT0mAEv35G2kLehTxrZK79VI=;
        b=lzn616epxwUmjiCskr6oQ2oOzA99oywlCIMqV9ePIvvK7xAdhvpskAD7GPyM7V+Mqo
         k2uQZoThb147sGeEfF3AswVfmL6q13JDeeKaIEGAHthq213d9+V8sjG4zqAz+oRpw3LP
         ZQH8RaixqegVlZCdkXOcOdnjK9tu3d3PmdrAsx0NyYc4yD6BasDcTRAbqpCyzkPC46gW
         IYYJmSbHfApHvCKXgH0O+oUyHV17+WHBm9x9+5e25vUPoFXyfIGjxPwcAsQKdoXA6JmX
         25nUoiOyo/th5OAyPc715OGhgitj4LFfZ6aYcvf1zR/kG9o0pbLTyXbTwcBobkR61F4q
         IXkg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=iTgEpdloHrbwWCcZlTliT0mAEv35G2kLehTxrZK79VI=;
        b=BPHHQBNrt0gu/thimuHrql0bnFs77gC8xpOvIuPNQY40Q7BPTSXj+IdNwRBz24GuYT
         BBQ1JIu+BNRLpeIzsRSY6fISZNfqEE3wNk+EGMRUbWcc9zXqvfDuUIS4qIL6t3IDiXtn
         WhxjH0ecMOwqJF+973xqIi0Mv9V4+ef0AxTu6u84+BQX2QvEPYX4XF06pG4MI0AuAePl
         vmtSU0D6mDHd1rQcze88s7UiZUoC/iSLXWvetzQdFRc9YzCBjWlbpW5AJJJboxbnn1Bn
         H4QKhVWPyD1NTbdCIMSd2+Fgs/SmwALurJi8W/4pHdmbnLd0sfVenFGyacBG6v/5ze/A
         NyuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=iTgEpdloHrbwWCcZlTliT0mAEv35G2kLehTxrZK79VI=;
        b=HxWMEebdBkrhDIkZEhZylT+rYc3mTEU1UuodIcPxn1AW9WCNrUGyFE9HquCHP4c+Pq
         pL1gTAhRuB9B+leDrb0vGcW0yUDovxcUYN1D70kuzBm8n9EjcXT7HF9Wj/IDKbWsoUoO
         H/kgGevCe6YcjISG/jgZBpAhJodcXV37yuG1sg3XXZj0xy2iFPvvZLkTOzK5A4HiNWV/
         Zs9t4iX7WV0/4gAzJRHckwJG1khmjggD9WswDT4sn9QJUGgsfSXi3VTD9ATE1h425ytq
         ntH33JNxTK6nTLrQBO5AuqaAtjlXpp4mvYhvdHGvkq43zJTgTOJDmW3evjmuKbtGZ5n8
         EmSw==
X-Gm-Message-State: AIVw110KD0VgE1Fps9tz92qrBZqVNVrdma8C/p9RAzdkibEnWAiB0KGF
	end6LbJLaB9tU1VH
X-Received: by 10.129.72.208 with SMTP id v199mr185051ywa.40.1499889085577;
        Wed, 12 Jul 2017 12:51:25 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.139.8 with SMTP id n8ls3847572iod.1.gmail; Wed, 12 Jul
 2017 12:51:24 -0700 (PDT)
X-Received: by 10.31.153.84 with SMTP id b81mr1478vke.14.1499889084296;
        Wed, 12 Jul 2017 12:51:24 -0700 (PDT)
In-Reply-To: <CAJ7KwrNU1eo=CLR3D4WWywwWMLGWFzLtbHN+Qga_9GSArL0Apg@mail.gmail.com>
X-Original-Sender: jmckesson@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:33191
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33191>

------=_Part_24_184945050.1499889083880
Content-Type: multipart/alternative; 
	boundary="----=_Part_25_655899050.1499889083880"

------=_Part_25_655899050.1499889083880
Content-Type: text/plain; charset="UTF-8"

On Wednesday, July 12, 2017 at 3:11:27 PM UTC-4, Dan Raviv wrote:
>
> Indeed, circular shift is just std::rotate.
>
> For the 'logical' shift,  I was thinking leaving them in the moved-from 
> state. Filling them with some value would both 1) have a cost 2) not 
> necessarily be desired.
>

But logical bitshifts do fill in a specific, well-defined value. So if this 
is going to be separate from `move[_backward]`, then it ought to have the 
behavior a user would expect.

So I'm for the same behavior as the equivalent std::move[_backward], at 
> least by default.
>

> It is possible to add an optional fill-in value parameter, if that's 
> something that would be deemed useful enough.
>

-- 
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/df32b9a3-9215-4517-9bba-ba42654c55ee%40isocpp.org.

------=_Part_25_655899050.1499889083880
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, July 12, 2017 at 3:11:27 PM UTC-4, Dan Raviv=
 wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.=
8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Indeed=
, circular shift is just std::rotate.<div><br></div><div>For the &#39;logic=
al&#39; shift, =C2=A0I was thinking leaving them in the moved-from state. F=
illing them with some value would both 1) have a cost 2) not necessarily be=
 desired.</div></div></blockquote><div><br>But logical bitshifts do fill in=
 a specific, well-defined value. So if this is going to be separate from `m=
ove[_backward]`, then it ought to have the behavior a user would expect.<br=
><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><d=
iv>So I&#39;m for the same behavior as the equivalent std::move[_backward],=
 at least by default.</div></div></blockquote><div></div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div><br></div><div>It is poss=
ible to add an optional fill-in value parameter, if that&#39;s something th=
at would be deemed useful enough.</div></div></blockquote><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/df32b9a3-9215-4517-9bba-ba42654c55ee%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/df32b9a3-9215-4517-9bba-ba42654c55ee=
%40isocpp.org</a>.<br />

------=_Part_25_655899050.1499889083880--

------=_Part_24_184945050.1499889083880--

.
