That checks whether an item is in an array, not whether an arbitrary pointer points inside an array (span?).
Granted, I'm not whether whether checking an arbitrary pointer is necessary. Maybe there's some self-nesting type for which checking items would not suffice?
I'm not sure I'm understanding you correctly. So given a T* item and std::span<T> span, you're saying to check whether item points inside span you get char* ptr = reinterpret_cast<char*>(item) then... what?
0
u/[deleted] Aug 11 '23
[deleted]