Is there a way to restrict the parameter type of a template function to only pointers or random-access iterators?
Say I am developing a sorting function which works
Use iterator traits:
static_assert( std::is_same::iterator_category>::value, "The mySort() function only accepts random access iterators or raw pointers to an array.\n");