From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 3302F3851C2B for ; Tue, 2 Jun 2020 20:15:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3302F3851C2B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-o97xr9-pM6CEwBXsG8UQXQ-1; Tue, 02 Jun 2020 16:15:13 -0400 X-MC-Unique: o97xr9-pM6CEwBXsG8UQXQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A2F4107ACF5; Tue, 2 Jun 2020 20:15:12 +0000 (UTC) Received: from localhost (unknown [10.33.36.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C2025D9CC; Tue, 2 Jun 2020 20:15:11 +0000 (UTC) Date: Tue, 2 Jun 2020 21:15:10 +0100 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: [PATCH] Extend std::copy/std::copy_n char* overload to deque iterator Message-ID: <20200602201510.GJ2678@redhat.com> References: <20200521121712.GC2678@redhat.com> <1f3fe6ef-cd1a-5fad-7d2b-a01a80a37269@gmail.com> <20200523163726.GU2678@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 20:15:16 -0000 On 24/05/20 15:43 +0200, François Dumont via Libstdc++ wrote: >Now tested in C++98 mode, there was indeed a small problem. > >I even wonder if I shouldn't have extend the std::copy overload to any >call with deque iterator as the output so that it is transform into an >output to pointer. > >Ok to commit ? >--- a/libstdc++-v3/include/debug/safe_iterator.tcc >+++ b/libstdc++-v3/include/debug/safe_iterator.tcc >@@ -234,6 +234,12 @@ namespace std _GLIBCXX_VISIBILITY(default) > { > _GLIBCXX_BEGIN_NAMESPACE_VERSION > >+ template >+ _Ite >+ __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, >+ std::random_access_iterator_tag>& __it) >+ { return __it.base(); } >+ I was going to ask if there's a reason this uses "_Ite" and not "_Iter", but I see we already have several uses of that. Thy all seem to be introduced by you though :-) We definitely have a lot more "_Iter" uses though: $ git grep -w _Ite -- include/ | wc -l 46 $ git grep -w _Iter -- include/ | wc -l 835 When I see "Ite" it looks to me as though it should rhyme with "sight" or "white", rather than "Iter" which rhymes with "bitter" (and so is the start of "iterator"). Leave it as _Ite for now, I might go through and change every _Ite to _Iter later. OK for master, thanks.