From 298990851796082562
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,396a971a96f93ef8
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-02-25 14:25:15 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: Andrew Koenig <ark@research.att.com>
Newsgroups: comp.std.c++
Subject: Re: random access iterator and copy-constructibility
Date: Tue, 25 Feb 2003 16:24:10 CST
Organization: AT&T Shannon Laboratory, Florham Park, NJ
Lines: 28
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <yu99znoknpqt.fsf@europa.research.att.com>
References: <b3d5ec$21mr$1@news.vol.cz> <yu99vfz9ifm1.fsf@europa.research.att.com> <b3e5fh$1dl$1@news.vol.cz> <8c8b368d.0302250632.5dc00dfb@posting.google.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
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)
Delivered-To: std-c++@ncar.ucar.edu
X-Nntp-Posting-Host: europa.research.att.com
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
X-Spam-Status: No, hits=-2.4 required=10.0
	tests=MISSING_HEADERS,NOSPAM_INC,REFERENCES,
	      SIGNATURE_SHORT_SPARSE,SPAM_PHRASE_03_05,USER_AGENT,
	      USER_AGENT_GNUS_UA,X_AUTH_WARNING
	version=2.43
X-Spam-Level: 
Xref: archiver1.google.com comp.std.c++:18073

Randy> I believe that you are correct that this requirement does not
Randy> appear in either the iterator or algorithm requirements,
Randy> however it does appear in the Container Requirements of 23.1/3
Randy> which requires contained objects to be both CopyConstructible
Randy> and Assignable.  Perhaps this container requirement is carried
Randy> through by implication or assumption?

Well, if you're going to sort a sequence, the elements of the sequence
had better be capable of being sorted -- which means that they had
better be capable of being compared and swapped.  That has nothing to
do with iterator requirements as such.

Similarly, if you're going to put elements into a container, it must
be possible to put them into the container, which means that they
must be capable of being copied and (at least for vectors) assigned.

But those are requirements on containers and algorithms, not on
iterators themselves.

-- 
Andrew Koenig, ark@research.att.com, http://www.research.att.com/info/ark

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]



