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

            Bug ID: 118083
           Summary: __possibly_const_range misses input_range constraint
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

possibly-const-range requires that the template parameter R satisfy
input_range, which libstdc++ misses, which leads to the following hard error:

#include <ranges>

struct NotRange {
  int* begin();
};

int main() {
  NotRange r;
  std::ranges::cbegin(r);
}

https://godbolt.org/z/YqMjbadsz

Reply via email to