Код: Выделить всё
template
void Foo(Iterator first, Iterator last) {
typedef typename Iterator::value_type Value;
std::vector vec;
vec.resize(last - first);
// ...
}
Подробнее здесь: https://stackoverflow.com/questions/430 ... s-iterator
Код: Выделить всё
template
void Foo(Iterator first, Iterator last) {
typedef typename Iterator::value_type Value;
std::vector vec;
vec.resize(last - first);
// ...
}