cmcstl2 icon indicating copy to clipboard operation
cmcstl2 copied to clipboard

no match for call to size inside ref_view

Open dvirtz opened this issue 5 years ago • 0 comments

The following code:

auto &&res = views::split(views::empty<int>, 0);
auto &&front = *begin(res);
return distance(views::ext::ref(front));

Fails to build on gcc trunk with:

/opt/compiler-explorer/libs/cmcstl2/include/stl2/view/ref.hpp:76:23: error: no match for call to '(const std::experimental::ranges::v1::__size::__fn) (std::experimental::ranges::v1::split_view<std::experimental::ranges::v1::empty_view<int>, std::experimental::ranges::v1::single_view<int> >::__outer_iterator<true>::value_type&)'

   76 |    return __stl2::size(*r_);

https://gcc.godbolt.org/z/_xdw75

dvirtz avatar Sep 10 '19 23:09 dvirtz