Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-09-08 18:36:36

Stefan Seefeld <sseefeld_at_[hidden]> writes:

>> From: Neal D. Becker [mailto:ndbecker2_at_[hidden]]
>> Sent: September 8, 2004 15:59
>> u.begin() should return an iterator, and the iterator should define
>> operator[]. Why doesn't this work?
> huh ? Which iterator defines operator[] ?

All legal random access iterators do (including, of course, pointers).
But nobody should use an iterator's operator[] in generic code because
it may be inefficient.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at