https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99433
--- Comment #7 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Thank you for the quick analysis!
> views::drop(E, F) is specified to be expression-equivalent to the braced
> init ranges::drop_view{E, F}
Is not completely true, right? As the narrowing warning shows:
```
libstdc++-v3/include/std/ranges:2101:24: warning: narrowing conversion of
‘std::declval<long unsigned int>()’ from ‘long unsigned int’ to
‘std::ranges::range_difference_t<std::ranges::ref_view<std::__cxx11::list<char>
> >’ {aka ‘long int’} [-Wnarrowing]
```
There is some `std::views::all` involved.
But the following expressions
```
#include <list>
#include <ranges>
int main()
{
std::list<char> list;
// std::views::drop(list, 0ull); // does not compile
std::ranges::drop_view{list, 0ull}; // does compile without warnings
std::ranges::drop_view{std::views::all(list), 0ull}; // does compile without
warnings
}
```
do compile without any warnings when using `g++-11 -std=c++2a -pedantic -Wall
-Wextra`!
Even when adding `-Wsystem-headers` there is no "narrowing" warning found in
those expressions.
Thank you for your incredible help!