From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18862 invoked by alias); 27 Sep 2019 12:28:22 -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 18847 invoked by uid 89); 27 Sep 2019 12:28:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=UD:1_neg.cc, pasttheend, UD:v.end, UD:v.begin X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Sep 2019 12:28:21 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3707F6412E; Fri, 27 Sep 2019 12:28:20 +0000 (UTC) Received: from localhost (unknown [10.33.36.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id A21925D6A7; Fri, 27 Sep 2019 12:28:19 +0000 (UTC) Date: Fri, 27 Sep 2019 12:28:00 -0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: copy/copy_backward/fill/fill_n/equal rework Message-ID: <20190927122818.GZ9487@redhat.com> References: <1aba6050-85ae-8753-eb81-0ec76340e10b@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: <1aba6050-85ae-8753-eb81-0ec76340e10b@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.0 (2019-05-25) X-SW-Source: 2019-09/txt/msg01596.txt.bz2 On 09/09/19 20:34 +0200, François Dumont wrote: >Hi > >    This patch improves stl_algobase.h >copy/copy_backward/fill/fill_n/equal implementations. The improvements >are: > >- activation of algo specialization for __gnu_debug::_Safe_iterator >(w/o _GLIBCXX_DEBUG mode) > >- activation of algo specialization for _Deque_iterator even if mixed >with another kind of iterator. > >- activation of algo specializations __copy_move_a2 for something else >than pointers. For example this code: > >std::vector v { 'a', 'b', .... }; > >ostreambuf_iterator out(std::cout); > >std::copy(v.begin(), v.end(), out); > >is not calling the specialization __copy_move_a2(const char*, const >char*, ostreambuf_iterator<>); > >It also fix a _GLIBCXX_DEBUG issue where the __niter_base >specialization was wrongly removing the _Safe_iterator<> layer. The >testsuite/25_algorithms/copy/debug/1_neg.cc test case was failing on a >debug assertion because _after_ the copy we were trying to increment >the vector iterator after past-the-end. Of course the problem is the >_after_, Debug mode should detect this _before_ it takes place which >it does now. > >Note that std::fill_n is now making use of std::fill for some >optimizations dealing with random access iterators. > >Performances are very good: This looks good, but I'm unable to apply the patch: error: patch failed: libstdc++-v3/include/bits/deque.tcc:967 error: libstdc++-v3/include/bits/deque.tcc: patch does not apply error: patch failed: libstdc++-v3/include/bits/stl_algobase.h:499 error: libstdc++-v3/include/bits/stl_algobase.h: patch does not apply Could you regenerate the patch (against a clean master tree) and resend? Thanks.