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

            Bug ID: 103982
           Summary: std::ranges::subrange does not work for clang
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

#include<utility>
#include<ranges>

int main()
{
        for(std::pair<int*,int*> it_pair{};
                auto e : std::ranges::subrange(it_pair.first,it_pair.second))
        {

        }
}

GCC accepts this code. However clang does not.

constraints not satisfied for alias template 'sentinel_t' [with _Range = const
std::ranges::subrange<int *, int *, std::ranges::subrange_kind::sized>]
        && sized_sentinel_for<sentinel_t<const _Derived>,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to