public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/111861] New: ranges::min/max should not use `auto __result = *__first;`
@ 2023-10-18  8:44 hewillk at gmail dot com
  0 siblings, 0 replies; only message in thread
From: hewillk at gmail dot com @ 2023-10-18  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111861
           Summary: ranges::min/max should not use `auto __result =
                    *__first;`
           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: ---

The constraints on the function signature do not guarantee that

  constructible_from<remove_cvref_t<iter_reference_t<I>>, iter_reference_t<I>> 

is true. The same goes for unique_copy's input_range branch.

Contrived testcase:

https://godbolt.org/z/Kannq6Yo9

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-18  8:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18  8:44 [Bug libstdc++/111861] New: ranges::min/max should not use `auto __result = *__first;` hewillk at gmail dot com

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