public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100768] New: Range iterator operations should be function objects
@ 2021-05-26 12:06 rs2740 at gmail dot com
  2021-05-26 13:37 ` [Bug libstdc++/100768] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rs2740 at gmail dot com @ 2021-05-26 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100768
           Summary: Range iterator operations should be function objects
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

They are currently implemented as plain function templates, which don't meet
the requirements in http://eel.is/c++draft/range.iter.ops.general#2

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

* [Bug libstdc++/100768] Range iterator operations should be function objects
  2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
@ 2021-05-26 13:37 ` redi at gcc dot gnu.org
  2021-05-26 18:40 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-26 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-05-26

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

* [Bug libstdc++/100768] Range iterator operations should be function objects
  2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
  2021-05-26 13:37 ` [Bug libstdc++/100768] " redi at gcc dot gnu.org
@ 2021-05-26 18:40 ` cvs-commit at gcc dot gnu.org
  2021-06-02 13:43 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-26 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:a49a045b92f982f5617c3bbde97a33157237e25b

commit r12-1074-ga49a045b92f982f5617c3bbde97a33157237e25b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed May 26 17:32:53 2021 +0100

    libstdc++: Change [range.iter.op] functions to function objects [PR 100768]

    The standard specifies std::ranges::distance etc as function templates,
    but it also requires them to not be found by ADL, and to suppress ADL
    when normal unqualified lookup does find them. That means they need to
    be function objects.

    libstdc++-v3/ChangeLog:

            PR libstdc++/100768
            * include/bits/ranges_base.h (advance, distance, next, prev):
            Replace function templates with function objects.
            * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
            Adjust for changes to function objects.
            * testsuite/std/ranges/adaptors/elements.cc: Add using
            declarations for names from namespace ranges.
            * testsuite/std/ranges/adaptors/transform.cc: Likewise.
            * testsuite/24_iterators/range_operations/100768.cc: New test.

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

* [Bug libstdc++/100768] Range iterator operations should be function objects
  2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
  2021-05-26 13:37 ` [Bug libstdc++/100768] " redi at gcc dot gnu.org
  2021-05-26 18:40 ` cvs-commit at gcc dot gnu.org
@ 2021-06-02 13:43 ` cvs-commit at gcc dot gnu.org
  2021-06-03 14:57 ` cvs-commit at gcc dot gnu.org
  2021-06-03 14:58 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-02 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:f2b76257e9a487fd2c7265094f7b4d1bd46f5f03

commit r11-8501-gf2b76257e9a487fd2c7265094f7b4d1bd46f5f03
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed May 26 17:32:53 2021 +0100

    libstdc++: Change [range.iter.op] functions to function objects [PR 100768]

    The standard specifies std::ranges::distance etc as function templates,
    but it also requires them to not be found by ADL, and to suppress ADL
    when normal unqualified lookup does find them. That means they need to
    be function objects.

    libstdc++-v3/ChangeLog:

            PR libstdc++/100768
            * include/bits/ranges_base.h (advance, distance, next, prev):
            Replace function templates with function objects.
            * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
            Adjust for changes to function objects.
            * testsuite/std/ranges/adaptors/elements.cc: Add using
            declarations for names from namespace ranges.
            * testsuite/std/ranges/adaptors/transform.cc: Likewise.
            * testsuite/24_iterators/range_operations/100768.cc: New test.

    (cherry picked from commit a49a045b92f982f5617c3bbde97a33157237e25b)

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

* [Bug libstdc++/100768] Range iterator operations should be function objects
  2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
                   ` (2 preceding siblings ...)
  2021-06-02 13:43 ` cvs-commit at gcc dot gnu.org
@ 2021-06-03 14:57 ` cvs-commit at gcc dot gnu.org
  2021-06-03 14:58 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-03 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:e01562b302eae3d415b43a4efe7ce52cff3e0063

commit r10-9886-ge01562b302eae3d415b43a4efe7ce52cff3e0063
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed May 26 17:32:53 2021 +0100

    libstdc++: Change [range.iter.op] functions to function objects [PR 100768]

    The standard specifies std::ranges::distance etc as function templates,
    but it also requires them to not be found by ADL, and to suppress ADL
    when normal unqualified lookup does find them. That means they need to
    be function objects.

    libstdc++-v3/ChangeLog:

            PR libstdc++/100768
            * include/bits/range_access.h (ranges::advance)
            (ranges::distance, ranges::next, ranges::prev): Replace
            function templates with function objects.
            * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
            Adjust for changes to function objects.
            * testsuite/std/ranges/adaptors/elements.cc: Add using
            declarations for names from namespace ranges.
            * testsuite/std/ranges/adaptors/transform.cc: Likewise.
            * testsuite/24_iterators/range_operations/100768.cc: New test.

    (cherry picked from commit a49a045b92f982f5617c3bbde97a33157237e25b)

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

* [Bug libstdc++/100768] Range iterator operations should be function objects
  2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
                   ` (3 preceding siblings ...)
  2021-06-03 14:57 ` cvs-commit at gcc dot gnu.org
@ 2021-06-03 14:58 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-03 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |10.4

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 10.4 and 11.2

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

end of thread, other threads:[~2021-06-03 14:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 12:06 [Bug libstdc++/100768] New: Range iterator operations should be function objects rs2740 at gmail dot com
2021-05-26 13:37 ` [Bug libstdc++/100768] " redi at gcc dot gnu.org
2021-05-26 18:40 ` cvs-commit at gcc dot gnu.org
2021-06-02 13:43 ` cvs-commit at gcc dot gnu.org
2021-06-03 14:57 ` cvs-commit at gcc dot gnu.org
2021-06-03 14:58 ` 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).