From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110472 invoked by alias); 7 Aug 2018 14:12:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 110451 invoked by uid 89); 7 Aug 2018 14:12:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Still, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Aug 2018 14:12:07 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1A9B7CBBA; Tue, 7 Aug 2018 14:12:05 +0000 (UTC) Received: from localhost (unknown [10.33.36.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89D0810075DA; Tue, 7 Aug 2018 14:12:05 +0000 (UTC) Date: Tue, 07 Aug 2018 14:12:00 -0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: Improve std::rotate usages Message-ID: <20180807141204.GN25399@redhat.com> References: <60f982e6-0fd3-79e6-6b63-f956e051538a@gmail.com> <408a1e34-8441-adf4-b48a-bf53934f62ef@gmail.com> <09ac2f4a-083c-8345-e6d8-0a13afae0f9e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <09ac2f4a-083c-8345-e6d8-0a13afae0f9e@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-08/txt/msg00487.txt.bz2 On 27/05/18 19:25 +0200, François Dumont wrote: >Still no chance to review it ? > >I'd like this one to go in before submitting other algo related patches. > >    * include/bits/stl_algo.h >    (__rotate(_Ite, _Ite, _Ite, forward_iterator_tag)) >    (__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag)) >    (__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move >code duplication... >    (rotate(_Ite, _Ite, _Ite)): ...here. >    (__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, >_Dist)): >    Simplify rotate call. >    (__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)): >    Likewise. >    (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)): >    Likewise. > >François > >On 14/05/2018 22:14, François Dumont wrote: >>Any feedback regarding this patch ? >> >> >>On 02/05/2018 07:26, François Dumont wrote: >>>Hi >>> >>>    std::rotate already returns the expected iterator so there is >>>no need for calls to std::advance/std::distance. Yes, looks like that code predated DR 488 which changed the return type of std::rotate. OK for trunk, thanks.