0
template <typename T>
void sort(T::iterator begin, T::iterator end){ ... }

I get this error on the function declaration:

'variable or field 'sort' declared void'

I tried adding std:: before the Ts in the parameters, didn't help. Tried adding typename before the Ts, no luck. What's the problem?

user3150201
  • 1,901
  • 5
  • 26
  • 29
  • two issues, 1. missing `typename`, 2. `T` is non-deducible, or maybe you meant [this syntax](http://coliru.stacked-crooked.com/a/ef6a387957a28e77) ? – Piotr Skotnicki Oct 12 '14 at 14:33
  • Normally, you just use `T` as the iterator type. `void sort(T begin, T end)` – chris Oct 12 '14 at 14:50

0 Answers0