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

            Bug ID: 126083
           Summary: ranges::max missing forward deref value
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

#include <ranges>
#include <algorithm>
#include <vector>

struct Proj {
  int operator()(std::tuple<int&, int&>&) const = delete;
  int operator()(std::tuple<int&, int&>&&) const;
  int operator()(std::tuple<int, int>) const;
};

int main() {
  std::vector<int> v1, v2;  
  auto z = std::ranges::max(std::views::zip(v1, v2), {}, Proj{});
}

Reply via email to