Example: https://godbolt.org/z/9MTYWPYqG
Fails with span-lite, works with std::span (e.g. by enabling -std=c++20)
The problem is that int& is convertible_to float const&. This is not true for int* and float const* so I think pointers can be used in span_REQUIRES_T on line 956, but I'm not sure if this solution has no other bugs.
Example: https://godbolt.org/z/9MTYWPYqG Fails with span-lite, works with std::span (e.g. by enabling
-std=c++20
) The problem is thatint&
is convertible_tofloat const&
. This is not true forint*
andfloat const*
so I think pointers can be used inspan_REQUIRES_T
on line 956, but I'm not sure if this solution has no other bugs.