public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100587] New: std::range::empty_view is not a view
@ 2021-05-13 13:43 gcc-bugs at marehr dot dialup.fu-berlin.de
  2021-05-13 14:48 ` [Bug libstdc++/100587] std::ranges::empty_view " gcc-bugs at marehr dot dialup.fu-berlin.de
  0 siblings, 1 reply; 2+ messages in thread
From: gcc-bugs at marehr dot dialup.fu-berlin.de @ 2021-05-13 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100587
           Summary: std::range::empty_view is not a view
           Product: gcc
           Version: 10.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
  Target Milestone: ---

The following snippet does not compile:

```c++
#include <ranges>

static_assert(std::ranges::view<std::ranges::empty_view<int>);
```

https://godbolt.org/z/3qanzdrb5

The standard says that https://eel.is/c++draft/range.empty#overview-1:

> empty_­view produces a view of no elements of a particular type.

empty_view is defined as inheriting from view_interface, the std::ranges::view
expects an inheritance from view_base per default.

Furthermore, https://eel.is/c++draft/ranges.syn does not specify 

> template<class T>
> inline constexpr bool enable_view<empty_view<T>> = true;

So I guess the standard is inconsistent here.

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

* [Bug libstdc++/100587] std::ranges::empty_view is not a view
  2021-05-13 13:43 [Bug libstdc++/100587] New: std::range::empty_view is not a view gcc-bugs at marehr dot dialup.fu-berlin.de
@ 2021-05-13 14:48 ` gcc-bugs at marehr dot dialup.fu-berlin.de
  0 siblings, 0 replies; 2+ messages in thread
From: gcc-bugs at marehr dot dialup.fu-berlin.de @ 2021-05-13 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

gcc-bugs at marehr dot dialup.fu-berlin.de changed:

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

--- Comment #1 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Sorry for the noise

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

end of thread, other threads:[~2021-05-13 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 13:43 [Bug libstdc++/100587] New: std::range::empty_view is not a view gcc-bugs at marehr dot dialup.fu-berlin.de
2021-05-13 14:48 ` [Bug libstdc++/100587] std::ranges::empty_view " gcc-bugs at marehr dot dialup.fu-berlin.de

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