From 6056216634623504984
X-Google-Thread: f78e5,1130da7a3640a78c
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news3.google.com!news.glorb.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: "dhruv" <dhruvbird@gmail.com>
Newsgroups: comp.std.c++
Subject: Re: Deprecate the use of plain pointers as standard container iterators
Date: Tue, 30 May 2006 08:48:35 CST
Organization: http://groups.google.com
Lines: 15
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <1148978918.438991.200380@j73g2000cwa.googlegroups.com>
References: <1146830242.416436.272780@g10g2000cwb.googlegroups.com>
   <1146842605.957240.37860@i39g2000cwa.googlegroups.com>
   <e3g12a$leh$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1148978923 2585 127.0.0.1 (30 May 2006 08:48:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 30 May 2006 08:48:43 +0000 (UTC)
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Original-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@ucar.edu
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.7.10) Gecko/20050715 Firefox/1.0.6 SUSE/1.0.6-16,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: j73g2000cwa.googlegroups.com; posting-host=210.18.139.109;
   posting-account=a49mnw0AAAAtnJmVO6AaR41qeRSSTrAN
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Xref: g2news2.google.com comp.std.c++:2152

imho, std::advance is supposed to be able to add to any inerator type.
However, it doesn't return anything, so it is not very useful in such
situations. yes, boost::next() is good, but something like a
combination of next & advance would be just great!!!!
std::next_Kth(x,K) returning the iterator which is K ahead of x.

Regards,
-Dhruv.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



