Hi,
for this code:
template <typename content, typename ptr, typename ref>
class tree_iterator
: public std::iterator<std::forward_iterator_tag, content, std::ptrdiff_t,
ptr, ref>
{
node<content> *node_;
public:
reference operator*() const {return node_->value;}
pointer operator->() const {return &(node_->value);}
};
gcc says
error: ISO C++ forbids declaration of `reference' with no type
error: expected `;' before "operator"
error: expected `;' before "pointer"
error: ISO C++ forbids declaration of `pointer' with no type
error: expected `;' before "operator"
error: expected `;' before '}' token
but as far as I understand, this is the intended usage of std::iterator,
and those names should be visible. Throwing using declarations at the problem
doesn't seems to help either. Any ideas what am I doing wrong?
Thx
ImRe