lamarrr/STX

Span does not work with function overloads

Closed this issue · 0 comments

Describe the bug
Span does not work for overloads due to the fact that many are valid even with static_cast. We'll need SFINAE to prevent some of these from participating in overload resolution.
i.e.

void process(Span<int>);
void process(Span<float>);

process(vector{1,2,3,4,5}); 

does not compile due to the ambiguous overloads as many of Span's constructors participate in overload resolution.

Expected behavior
The above snippet to compile.