From -3227030131987287111
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,9384bfc667402a91
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-03-10 07:57:56 PST
Path: archiver1.google.com!news2.google.com!fu-berlin.de!peer1.news.newnet.co.uk!peer1.news.newnet.co.uk!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: kuyper@wizard.net (James Kuyper)
Newsgroups: comp.std.c++
Subject: Re: Vector should be used by default?
Date: Wed, 10 Mar 2004 15:57:55 +0000 (UTC)
Organization: http://groups.google.com
Lines: 34
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <8b42afac.0403100651.54b70d5f@posting.google.com>
References: <c2lq2i$m3m$1@news.kreonet.re.kr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: mail2news.demon.co.uk 1078934275 14520 10.0.0.1 (10 Mar 2004 15:57:55 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 10 Mar 2004 15:57:55 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1B165i-0003m2-00
	for mail2news@news.news.demon.net; Wed, 10 Mar 2004 15:57:54 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i2AFvpi2021802; Thu, 11 Mar 2004 02:57:51 +1100 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i2AFvnO9021792;
	Thu, 11 Mar 2004 02:57:49 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: Wed, 10 Mar 2004 14:51:05 +0000 (UTC)
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=0.1 required=5.2 tests=AWL autolearn=no 
	version=2.60-mulga_r1
Xref: archiver1.google.com comp.std.c++:1303

stkim@yujinrobot.com ("Kim, Seungtai") wrote in message news:<c2lq2i$m3m$1@news.kreonet.re.kr>...
> What is the intent of next statement? Coding guide? Encorage the usage of vector?
> 
> I can't catch the exact meaning of it.
> 
> 
>     23.1.1/2
>     ...vector is the type of sequence that should be used by default....
> 
> 
> If I use the deque or list when it can be substituted by vector,
> it is to be ill-formed program? Or is there any other criterion?


It is a design guideline. The different standard sequences have
different complexity requirements, with corresponding differences in
the set of optional operations (Table 68) they're required to support,
and different specifications concerning the situations under which
iterators and references to contained objects become invalid.

Section 23.1.1p2 is an overview statement that describes the kinds of
situations in which each type of sequence should be the best one to
use. In so far as your code relies only on those features of sequences
that are described in section 23.1.1 paragraphs 1-11, (plus the
general container requirements that preceed them), you should get
equivalent results (with different speeds) no matter which kind of
sequence you use.

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



