public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++/98466 Fix _GLIBCXX_DEBUG N3644 integration
Date: Thu, 14 Jan 2021 19:34:11 +0100	[thread overview]
Message-ID: <c75eef2a-8401-f2ba-54f3-8ca0eb184201@gmail.com> (raw)
In-Reply-To: <20210114171547.GJ7692@redhat.com>

On 14/01/21 6:15 pm, Jonathan Wakely wrote:
> On 14/01/21 17:10 +0000, Jonathan Wakely wrote:
>> On 01/01/21 18:51 +0100, François Dumont via Libstdc++ wrote:
>>> I think the PR is not limited to unordered containers iterator, it 
>>> impacts all _GLIBCXX_DEBUG iterators.
>>>
>>> However unordered containers local_iterator was more complicated to 
>>> handle. Because of c++/65816 I prefer to review 
>>> _Node_iterator_default constructor to set _M_cur to nullptr even if 
>>> in principle it is not necessary except for the _Local_iterator_base 
>>> constructor when hash code is not cached.
>>>
>>>     libstdc++: Implement N3644 for _GLIBCXX_DEBUG iterators
>>>
>>>     libstdc++-v3/ChangeLog
>>>
>>>             PR libstdc++/98466
>>>             * include/bits/hashtable_policy.h 
>>> (_Node_iterator_base()): Set _M_cur to nullptr.
>>>             (_Node_iterator()): Make default.
>>>             (_Node_const_iterator()): Make default.
>>>             * include/debug/macros.h 
>>> (__glibcxx_check_erae_range_after): Add _M_singular
>>>             iterator checks.
>>>             * include/debug/safe_iterator.h
>>>             (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Accept if 
>>> both iterator are value initialized.
>>>             * include/debug/safe_local_iterator.h 
>>> (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
>>>             Likewise.
>>>             * include/debug/safe_iterator.tcc 
>>> (_Safe_iterator<>::_M_valid_range): Add
>>>             _M_singular checks on input iterators.
>>>             * src/c++11/debug.cc 
>>> (_Safe_iterator_base::_M_can_compare): Remove _M_singular
>>>             checks.
>>>             * 
>>> testsuite/23_containers/deque/debug/98466.cc: New test.
>>>             * 
>>> testsuite/23_containers/unordered_map/debug/98466.cc: New test.
>>>
>>> Tested under Linux x86_64 normal and debug mode.
>>>
>>> Ok to commit ?
>>
>> Yes, thanks.
>
> I've just realised that this C++14 change used to be noted in the
> C++14 status table:
>
>     <row>
>       <?dbhtml bgcolor="#B0B0B0" ?>
>       <entry>
>        <link xmlns:xlink="http://www.w3.org/1999/xlink" 
> xlink:href="http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2013/n3644.pdf">
>          N3644
>        </link>
>       </entry>
>       <entry>Null Forward Iterators</entry>
>       <entry>Partial</entry>
>       <entry>Only affects Debug Mode</entry>
>      </row>
>
> But I removed that last year when replacing the list of proposals with
> the Table of Contents taken from the standard, in commit
> 57ede05c6a0b443943e312bf205cb79233c9396f (oops!)
>
> For the branches we should either document that missing feature in a
> note, or backport your fix in a few weeks.
>
>
>
I'll keep the backport in my TODOs.


  reply	other threads:[~2021-01-14 18:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-01 17:51 François Dumont
2021-01-14 17:10 ` Jonathan Wakely
2021-01-14 17:15   ` Jonathan Wakely
2021-01-14 18:34     ` François Dumont [this message]
2021-01-14 18:33   ` François Dumont
2021-01-14 19:20     ` Jonathan Wakely

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=c75eef2a-8401-f2ba-54f3-8ca0eb184201@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /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).