public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
@ 2023-02-16 18:05 ppalka at gcc dot gnu.org
  2023-02-16 23:28 ` [Bug libstdc++/108827] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-02-16 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108827
           Summary: [C++23] Implement P2387R3, Pipe support for
                    user-defined range adaptors
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

Tracker bug for https://wg21.link/p2387r3

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
@ 2023-02-16 23:28 ` redi at gcc dot gnu.org
  2023-04-18 11:23 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-16 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-02-16

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
  2023-02-16 23:28 ` [Bug libstdc++/108827] " redi at gcc dot gnu.org
@ 2023-04-18 11:23 ` cvs-commit at gcc dot gnu.org
  2023-04-18 11:28 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r14-29-gcb5c71d16d0fb47638498365f5c857ce7c673eaf
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Apr 18 07:21:13 2023 -0400

    libstdc++: Implement range_adaptor_closure from P2387R3 [PR108827]

            PR libstdc++/108827

    libstdc++-v3/ChangeLog:

            * include/bits/ranges_cmp.h (__cpp_lib_ranges): Bump value
            for C++23.
            * include/std/ranges (range_adaptor_closure): Define for C++23.
            * include/std/version (__cpp_lib_ranges): Bump value for
            C++23.
            * testsuite/std/ranges/version_c++23.cc: Bump expected value
            of __cpp_lib_ranges.
            * testsuite/std/ranges/range_adaptor_closure.cc: New test.

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
  2023-02-16 23:28 ` [Bug libstdc++/108827] " redi at gcc dot gnu.org
  2023-04-18 11:23 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 11:28 ` cvs-commit at gcc dot gnu.org
  2023-08-17 16:40 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:769c324424500a3d20de7417f62a4e7bce345775

commit r13-7214-g769c324424500a3d20de7417f62a4e7bce345775
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Apr 18 07:21:13 2023 -0400

    libstdc++: Implement range_adaptor_closure from P2387R3 [PR108827]

            PR libstdc++/108827

    libstdc++-v3/ChangeLog:

            * include/bits/ranges_cmp.h (__cpp_lib_ranges): Bump value
            for C++23.
            * include/std/ranges (range_adaptor_closure): Define for C++23.
            * include/std/version (__cpp_lib_ranges): Bump value for
            C++23.
            * testsuite/std/ranges/version_c++23.cc: Bump expected value
            of __cpp_lib_ranges.
            * testsuite/std/ranges/range_adaptor_closure.cc: New test.

    (cherry picked from commit cb5c71d16d0fb47638498365f5c857ce7c673eaf)

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-04-18 11:28 ` cvs-commit at gcc dot gnu.org
@ 2023-08-17 16:40 ` cvs-commit at gcc dot gnu.org
  2023-09-07 12:51 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-17 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:4a6f3676e7dd9e73a822f4da634b037299f0d482

commit r14-3293-g4a6f3676e7dd9e73a822f4da634b037299f0d482
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Aug 17 12:40:04 2023 -0400

    libstdc++: Convert _RangeAdaptorClosure into a CRTP base [PR108827]

    Using the CRTP idiom for this base class avoids bloating the size of a
    pipeline when adding distinct empty range adaptor closure objects to it,
    as detailed in section 4.1 of P2387R3.

    But it means we can no longer define its operator| overloads as hidden
    friends, since it'd mean each instantiation of _RangeAdaptorClosure
    introduces its own distinct set of hidden friends.  So e.g. for the
    outer | in

      x | (views::reverse | views::join)

    ADL would find 6 distinct hidden operator| friends:

      two from _RangeAdaptorClosure<_Reverse>
      two from _RangeAdaptorClosure<_Join>
      two from _RangeAdaptorClosure<_Pipe<_Reverse, _Join>>

    but we really only want to consider the last two.

    We avoid this issue by instead defining the operator| overloads at
    namespace scope alongside _RangeAdaptorClosure.  This should be fine
    because the only types defined in this namespace are _RangeAdaptorClosure,
    _RangeAdaptor, _Pipe and _Partial, so we don't have to worry about
    unintentional ADL.

    Reviewed-by: Jonathan Wakely <jwakely@redhat.com>

            PR libstdc++/108827

    libstdc++-v3/ChangeLog:

            * include/std/ranges (__adaptor::_RangeAdaptorClosure):
            Convert into a CRTP class template.  Move hidden operator|
            friends into namespace scope and adjust their constraints.
            (__closure::__is_range_adaptor_closure_fn): Define.
            (__closure::__is_range_adaptor_closure): Define.
            (__adaptor::_Partial): Adjust use of _RangeAdaptorClosure.
            (__adaptor::_Pipe): Likewise.
            (views::_All): Likewise.
            (views::_Join): Likewise.
            (views::_Common): Likewise.
            (views::_Reverse): Likewise.
            (views::_Elements): Likewise.
            (views::_Adjacent): Likewise.
            (views::_AsRvalue): Likewise.
            (views::_Enumerate): Likewise.
            (views::_AsConst): Likewise.
            * testsuite/std/ranges/adaptors/all.cc: Reinstate assertion
            expecting that adding empty range adaptor closure objects to a
            pipeline doesn't increase the size of a pipeline.

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-08-17 16:40 ` cvs-commit at gcc dot gnu.org
@ 2023-09-07 12:51 ` redi at gcc dot gnu.org
  2024-01-13  4:02 ` cvs-commit at gcc dot gnu.org
  2024-01-13  4:06 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-09-07 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The new bind_back call wrapper still needs to be added (which will need to be
done before https://wg21.link/p2714r1 can be implemented for C++26).

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-09-07 12:51 ` redi at gcc dot gnu.org
@ 2024-01-13  4:02 ` cvs-commit at gcc dot gnu.org
  2024-01-13  4:06 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-13  4:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

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

commit r14-7220-gac1a399bf61b04845f5d6fc34e4b7a4db2bc5760
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Jan 12 23:02:12 2024 -0500

    libstdc++: Implement C++23 std::bind_back from P2387R3 [PR108827]

    The implementation is based off of std::bind_front.  Since this is a
    C++23 feature we use deducing this unconditionally.

            PR libstdc++/108827
            PR libstdc++/111327

    libstdc++-v3/ChangeLog:

            * include/bits/version.def (bind_back): Define.
            * include/bits/version.h: Regenerate.
            * include/std/functional (_Bind_back): Define for C++23.
            (bind_back): Likewise.
            * testsuite/20_util/function_objects/bind_back/1.cc: New test
            (adapted from corresponding bind_front test).
            * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.

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

* [Bug libstdc++/108827] [C++23] Implement P2387R3, Pipe support for user-defined range adaptors
  2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-13  4:02 ` cvs-commit at gcc dot gnu.org
@ 2024-01-13  4:06 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-13  4:06 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |14.0
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fully implemented for GCC 14.

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

end of thread, other threads:[~2024-01-13  4:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 18:05 [Bug libstdc++/108827] New: [C++23] Implement P2387R3, Pipe support for user-defined range adaptors ppalka at gcc dot gnu.org
2023-02-16 23:28 ` [Bug libstdc++/108827] " redi at gcc dot gnu.org
2023-04-18 11:23 ` cvs-commit at gcc dot gnu.org
2023-04-18 11:28 ` cvs-commit at gcc dot gnu.org
2023-08-17 16:40 ` cvs-commit at gcc dot gnu.org
2023-09-07 12:51 ` redi at gcc dot gnu.org
2024-01-13  4:02 ` cvs-commit at gcc dot gnu.org
2024-01-13  4:06 ` ppalka 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).