From -3309268564862395256
X-Google-Thread: f78e5,1130da7a3640a78c
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news4.google.com!news.glorb.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: brangdon@cix.co.uk (Dave Harris)
Newsgroups: comp.std.c++
Subject: Re: Deprecate the use of plain pointers as standard container iterators
Date: 11 May 2006 15:00:05 GMT
Organization: "Altopia Corp. - Usenet Access - www.altopia.com"
Lines: 24
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <memo.20060511122249.2788A@brangdon.cix.compulink.co.uk>
References: <1147209142.296257.76680@j33g2000cwa.googlegroups.com>
Reply-To: brangdon@cix.co.uk
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
X-Orig-X-Trace: individual.net mEc4fMWZ8WZJTpeA00gHdw/hCQySmgTJm5z3oZafSzEDUjAmQ=
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++:1901

johnchx2@yahoo.com () wrote (abridged):
> I would have thought that the easiest workaround would be to replace
> the iterator overload with a template:

That has the several drawbacks of templates. It means the function source 
now has to be in the header, when before it wasn't. It also means we have 
defined an open-ended family of functions rather than the exactly 2 I 
wanted. We shouldn't need templates for this.


> It seems to me that the problem is with the intuition that
> std::vector<int>::iterator is a distinguished type

In my view the intuition is fine, and the problem is that the standard 
does not require implementations to match it.

-- Dave Harris, Nottingham, UK.

---
[ 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                      ]



