I'm trying to create a set of overloaded templates for arrays/pointers where one template will be used when the compiler knows the size of the array and the other template will be used when it doesn't:
template <typename T, size_t SZ>
void moo(T (&arr)[SZ])
{ ... }
template <typename T>
void moo(T *ptr)
{ ... }
The problem is that when the compiler knows the size of the array, the overloads are ambiguous and the compile fails.
Is there some way to resolve the ambiguity (perhaps via SFINAE) or is this just not possible.