From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117647 invoked by alias); 28 Sep 2016 19:40:26 -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 117034 invoked by uid 89); 28 Sep 2016 19:40:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=friend X-Spam-User: qpsmtpd, 2 recipients 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; Wed, 28 Sep 2016 19:40:24 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D70031CCA91; Wed, 28 Sep 2016 19:40:22 +0000 (UTC) Received: from localhost (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8SJeLEa031102; Wed, 28 Sep 2016 15:40:22 -0400 Date: Wed, 28 Sep 2016 19:47:00 -0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: Andreas Schwab , "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: debug container mutex association Message-ID: <20160928194021.GC29482@redhat.com> References: <46b4f297-c0da-b0b0-03ef-bba019b97ec7@gmail.com> <20160914090036.GC17376@redhat.com> <20160915085143.GJ17376@redhat.com> <2af7879c-bef5-7874-b5ae-722ad3a1e171@gmail.com> <423b791c-4924-bfeb-5b54-ce9fd452bf2c@gmail.com> <20160927103202.GT17376@redhat.com> <3ae43aa8-5002-63cc-e721-28d2962ff594@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: <3ae43aa8-5002-63cc-e721-28d2962ff594@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.0 (2016-08-17) X-SW-Source: 2016-09/txt/msg02192.txt.bz2 On 28/09/16 21:30 +0200, François Dumont wrote: >On 27/09/2016 12:32, Jonathan Wakely wrote: >>Index: include/debug/safe_base.h >>>=================================================================== >>>--- include/debug/safe_base.h (revision 240509) >>>+++ include/debug/safe_base.h (working copy) >>>@@ -121,11 +121,11 @@ >>> void >>> _M_detach(); >>> >>>+ public: >>> /** Likewise, but not thread-safe. */ >>> void >>> _M_detach_single() throw (); >>> >>>- public: >>> /** Determines if we are attached to the given sequence. */ >>> bool >>> _M_attached_to(const _Safe_sequence_base* __seq) const >> >> >>Would this be a smaller change, that doesn't make the member >>accessible to all code? >> >>--- a/libstdc++-v3/include/debug/safe_base.h >>+++ b/libstdc++-v3/include/debug/safe_base.h >>@@ -50,6 +50,7 @@ namespace __gnu_debug >> class _Safe_iterator_base >> { >> friend class _Safe_sequence_base; >>+ template friend class _Safe_sequence; >> >> public: >> /** The sequence this iterator references; may be NULL to indicate >>. >> >I am not a great fan of friend class. As long as it was friend >declaration between iterator and sequence base types it was ok. Now >that we need to make a template class friend I consider that it is too >much friendship and prefer to make the necessary method public. OK. >But if you think otherwise just tell me and I will use your approach. Making it public is fine. Please commit your original patch, thanks!