|
Boost Users : |
From: Jim Lear (jim.lear_at_[hidden])
Date: 2004-12-10 11:07:55
goochrules! wrote:I know this is not the correct place to suggest new features to the STL, but I can't find a similar group for STL. Any suggestions? Sorry for the interruption. P.S. In case you're wondering what the suggestion is: Add ability to use random access operators with iterators. E.g. vector<int> intv; ... vector<int>::iterator i=intv.begin(); intv[i]++;What do you want that last line to do? To me it looks like you could be using "(*i)++;" instead to achieve the same result.It seems odd and confusing that iterators have pointer semantics but not random access semantics.they do already, well, some of them at least do (of which, vector is one): http://www.sgi.com/tech/stl/RandomAccessIterator.html.Random access iterators do have random access semantics, but that particular expression won't compile with some (mutable) random access iterators. The problem is that the result of p[i] is only required to be convertible to the iterator's value_type. Cheers,
-- Jim Lear This document/email may contain confidential, proprietary or privileged information and is intended only for use of the addressee/recipient named above. No confidentiality or privilege is waived or lost by any error in transmission of this document/email. If you are not the intended recipient of this document/email of Legerity, Inc., you are hereby notified that you must not use, disseminate, or copy it in any form or take any action in reliance on it. If you have received this document/email in error, please immediately notify me at (512) 228-5760 and permanently destroy/delete the original document/email and any copy of the document/email and printout thereof.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net