How can I implement for instance the following
template <typename ITERATOR> void Swap (ITERATOR a, ITERATOR b) {
...
}
so that Swap(a, b) swaps the values pointed at by a and b.
In other words: How can I create a third variable without knowing the data type?
Use
std::iterator_traits<ITERATOR>::value_type