I have a class something like that:
template <class T>
class bag
{
public:
private:
typedef struct{void* prev; struct{T item; unsigned int count;} body; void* next;}* node;
typedef struct{
node operator->() { return current; }
operator(){;} // <- i can not do that, right?
private:
node current;
} iterator;
//...
};
So, how to write a constructor for the bag::iterator?