public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100990] New: Iterator checks for Debug Mode cannot be used with a non-common range
@ 2021-06-09  9:46 redi at gcc dot gnu.org
  2021-09-25 20:08 ` [Bug libstdc++/100990] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-09  9:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100990

            Bug ID: 100990
           Summary: Iterator checks for Debug Mode cannot be used with a
                    non-common range
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

The Debug Mode iterator checks assume two iterators of the same type, so do not
work with an iterator and a sentinel.

It should be possible to use std::common_iterator like so:

   __glibcxx_require_valid_range(common_iterator<_It, _Sent>(__it),
                                 common_iterator<_It, _Sent>(__sent));

But wrapping a _Safe_iterator in common_iterator will prevent the checks from
making use of the additional information present in a _Safe_iterator (and maybe
prevent other checks from matching the iterator type?)

It would be nice to be able to use those debug mode assertions in ranges algos
and ranges::advance etc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libstdc++/100990] Iterator checks for Debug Mode cannot be used with a non-common range
  2021-06-09  9:46 [Bug libstdc++/100990] New: Iterator checks for Debug Mode cannot be used with a non-common range redi at gcc dot gnu.org
@ 2021-09-25 20:08 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-09-25 20:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100990

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-09-25
     Ever confirmed|0                           |1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-25 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  9:46 [Bug libstdc++/100990] New: Iterator checks for Debug Mode cannot be used with a non-common range redi at gcc dot gnu.org
2021-09-25 20:08 ` [Bug libstdc++/100990] " redi at gcc dot gnu.org

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).