I have a view with the following interface:
template< class RandomIt > void my_sort( RandomIt first, RandomIt last ) { }
I expect RandomIt be an iterator from std::vector<T>.begin()/end() or a simple pointer like T* first,T* last . I think if I assume that RandomIt is a vector, I can get it from RandomIt::value_type , but then this will not work for T* first,T* last .
My question is: how can I extract value_type T from a template parameter in both cases?
kfmfe04
source share