public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100436] New: std::views::iota(0, true) is well-formed
@ 2021-05-05 15:54 hewillk at gmail dot com
  2021-05-05 16:10 ` [Bug libstdc++/100436] " hewillk at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2021-05-05 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100436
           Summary: std::views::iota(0, true) is well-formed
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

Hi, The following is accepted since gcc-11:

https://godbolt.org/z/P8v383Wr3

#include <ranges>
auto r = std::views::iota(0, true);

Shouldn't this be ill-formed? Isn’t this kind of initialization explicitly
prohibited in the deduction guides? Correct me if i am wrong, thanks.

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

* [Bug libstdc++/100436] std::views::iota(0, true) is well-formed
  2021-05-05 15:54 [Bug libstdc++/100436] New: std::views::iota(0, true) is well-formed hewillk at gmail dot com
@ 2021-05-05 16:10 ` hewillk at gmail dot com
  2021-05-05 17:27 ` hewillk at gmail dot com
  2021-05-05 17:36 ` hewillk at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2021-05-05 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
Oh, I see, the reason is that std::ranges::__detail::__is_integer_like<bool> is
set to false since gcc-11.

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

* [Bug libstdc++/100436] std::views::iota(0, true) is well-formed
  2021-05-05 15:54 [Bug libstdc++/100436] New: std::views::iota(0, true) is well-formed hewillk at gmail dot com
  2021-05-05 16:10 ` [Bug libstdc++/100436] " hewillk at gmail dot com
@ 2021-05-05 17:27 ` hewillk at gmail dot com
  2021-05-05 17:36 ` hewillk at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2021-05-05 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

康桓瑋 <hewillk at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #1)
> Oh, I see, the reason is that std::ranges::__detail::__is_integer_like<bool>
> is set to false since gcc-11.

This is just the implementation of LWG 3467.

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

* [Bug libstdc++/100436] std::views::iota(0, true) is well-formed
  2021-05-05 15:54 [Bug libstdc++/100436] New: std::views::iota(0, true) is well-formed hewillk at gmail dot com
  2021-05-05 16:10 ` [Bug libstdc++/100436] " hewillk at gmail dot com
  2021-05-05 17:27 ` hewillk at gmail dot com
@ 2021-05-05 17:36 ` hewillk at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2021-05-05 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #2)
> (In reply to 康桓瑋 from comment #1)
> > Oh, I see, the reason is that std::ranges::__detail::__is_integer_like<bool>
> > is set to false since gcc-11.
> 
> This is just the implementation of LWG 3467.

I think the legality of std::views::iota(-100, false) is just an inadvertent of
LWG 3467.

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

end of thread, other threads:[~2021-05-05 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 15:54 [Bug libstdc++/100436] New: std::views::iota(0, true) is well-formed hewillk at gmail dot com
2021-05-05 16:10 ` [Bug libstdc++/100436] " hewillk at gmail dot com
2021-05-05 17:27 ` hewillk at gmail dot com
2021-05-05 17:36 ` hewillk at gmail dot com

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