public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: Andreas Schwab <schwab@suse.de>,
	       "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	       gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: debug container mutex association
Date: Wed, 28 Sep 2016 19:47:00 -0000	[thread overview]
Message-ID: <20160928194021.GC29482@redhat.com> (raw)
In-Reply-To: <3ae43aa8-5002-63cc-e721-28d2962ff594@gmail.com>

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<typename> 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!


  reply	other threads:[~2016-09-28 19:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 20:37 François Dumont
2016-09-14  9:01 ` Jonathan Wakely
2016-09-14 20:53   ` François Dumont
2016-09-15  9:15     ` Jonathan Wakely
2016-09-19 20:19       ` François Dumont
2016-09-20  8:58         ` Jonathan Wakely
2016-09-27 15:39           ` Jonathan Wakely
2016-09-27 21:14             ` François Dumont
2016-09-20  9:20         ` Jonathan Wakely
2016-09-26 11:55           ` Jonathan Wakely
2016-09-26 12:23         ` Andreas Schwab
2016-09-26 22:09           ` François Dumont
2016-09-27 10:32             ` Jonathan Wakely
2016-09-28 19:35               ` François Dumont
2016-09-28 19:47                 ` Jonathan Wakely [this message]
2017-12-29 16:10         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160928194021.GC29482@redhat.com \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).