A
AlesD
Hello,
maybe my question is stupid, but...
I have function/algorithm which operates on sequence holding objects of
type T. The problem is that I do not know (at the declaration time)
which sequence (vector<T> or list<T>) will be used.
class element_t {
void some_method(void);
}
template <class InputIterator>
void visitor(InputIterator first, InputIterator last)
{
// some code
first->some_method(); // Error here
}
How can I specify that InputIterator is convertible to T*?
Thanks in advance, Ales
maybe my question is stupid, but...
I have function/algorithm which operates on sequence holding objects of
type T. The problem is that I do not know (at the declaration time)
which sequence (vector<T> or list<T>) will be used.
class element_t {
void some_method(void);
}
template <class InputIterator>
void visitor(InputIterator first, InputIterator last)
{
// some code
first->some_method(); // Error here
}
How can I specify that InputIterator is convertible to T*?
Thanks in advance, Ales