question on operator->

Next Library design using C++ Up: cppR 5/5

p 6-11
The C++ Oracle
by Steven Buroff and Robert Murray

Question from Paul Lucas (Note:
 Lucas)

template<class T> class ContainerIterator {
    T* current;
    //...
  public:
    class ContainerIterator(Container<T>&);
    //...
    T* operator->() const { return current; }
};

This only works if T is an aggregate.



automatically generated by info2www version 1.2.2.8