public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/103982] New: std::ranges::subrange does not work for clang
@ 2022-01-11 20:38 unlvsur at live dot com
  2022-01-11 20:38 ` [Bug libstdc++/103982] " unlvsur at live dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: unlvsur at live dot com @ 2022-01-11 20:38 UTC (permalink / raw)
  To: gcc-bugs

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>,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-11 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 20:38 [Bug libstdc++/103982] New: std::ranges::subrange does not work for clang unlvsur at live dot com
2022-01-11 20:38 ` [Bug libstdc++/103982] " unlvsur at live dot com
2022-01-11 21:14 ` pinskia at gcc dot gnu.org
2022-01-11 21:18 ` redi at gcc dot gnu.org

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