This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 28/09/16 21:30 +0200, François Dumont wrote:
On 27/09/2016 12:32, Jonathan Wakely wrote: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.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) constWould 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 .
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!
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |