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

Reply via email to