public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints
@ 2023-12-01  3:36 hewillk at gmail dot com
  2023-12-01 15:03 ` [Bug libstdc++/112802] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hewillk at gmail dot com @ 2023-12-01  3:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112802
           Summary: <ranges>: _ToClosure::operator() has no constraints
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

which means this is not SFINAE-friendly. That's not standard compliance, right?

  #include <ranges>
  #include <vector>

  template<class T>
  concept test = requires { std::ranges::to<std::vector<int>>()(T{}); };

  static_assert(!test<int>); // hard error in libstdc++

https://godbolt.org/z/Tasba18Kv

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

* [Bug libstdc++/112802] <ranges>: _ToClosure::operator() has no constraints
  2023-12-01  3:36 [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints hewillk at gmail dot com
@ 2023-12-01 15:03 ` redi at gcc dot gnu.org
  2023-12-06 20:04 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2023-12-01 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Patrick has a pending patch to improve those adaptors.

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

* [Bug libstdc++/112802] <ranges>: _ToClosure::operator() has no constraints
  2023-12-01  3:36 [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints hewillk at gmail dot com
  2023-12-01 15:03 ` [Bug libstdc++/112802] " redi at gcc dot gnu.org
@ 2023-12-06 20:04 ` ppalka at gcc dot gnu.org
  2023-12-18 23:06 ` cvs-commit at gcc dot gnu.org
  2023-12-18 23:07 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-12-06 20:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
   Target Milestone|---                         |14.0
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-12-06
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I can fix this as a follow-up.

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

* [Bug libstdc++/112802] <ranges>: _ToClosure::operator() has no constraints
  2023-12-01  3:36 [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints hewillk at gmail dot com
  2023-12-01 15:03 ` [Bug libstdc++/112802] " redi at gcc dot gnu.org
  2023-12-06 20:04 ` ppalka at gcc dot gnu.org
@ 2023-12-18 23:06 ` cvs-commit at gcc dot gnu.org
  2023-12-18 23:07 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-18 23:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:4f54e656788be3268dd45eb036447464a937fae9

commit r14-6668-g4f54e656788be3268dd45eb036447464a937fae9
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Dec 18 18:05:36 2023 -0500

    libstdc++: Make ranges::to closure objects SFINAE-friendly [PR112802]

    This also happens to fix composition of these closure objects.

            PR libstdc++/112802
            PR libstdc++/113068

    libstdc++-v3/ChangeLog:

            * include/std/ranges (__detail::_To::operator()): Add constraints.
            (__detail::_To2::operator()): Likewise.
            * testsuite/std/ranges/conv/1.cc (test_sfinae): New test.
            (test_composition): New test.

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

* [Bug libstdc++/112802] <ranges>: _ToClosure::operator() has no constraints
  2023-12-01  3:36 [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2023-12-18 23:06 ` cvs-commit at gcc dot gnu.org
@ 2023-12-18 23:07 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-12-18 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed

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

end of thread, other threads:[~2023-12-18 23:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-01  3:36 [Bug libstdc++/112802] New: <ranges>: _ToClosure::operator() has no constraints hewillk at gmail dot com
2023-12-01 15:03 ` [Bug libstdc++/112802] " redi at gcc dot gnu.org
2023-12-06 20:04 ` ppalka at gcc dot gnu.org
2023-12-18 23:06 ` cvs-commit at gcc dot gnu.org
2023-12-18 23:07 ` 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).