From -6602852610119540638
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c0e61b6a667823c0
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <bonnardv@pratique.fr>
Subject: Re: no const operator[] in STL map?
Date: 1999/01/24
Message-ID: <36A8E03F.73C8@pratique.fr>#1/1
X-Deja-AN: 436307582
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <916993358.766341@aloomba.aaii.oz.au>
X-Original-Date: Fri, 22 Jan 1999 21:31:59 +0100
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 917186429 5486 128.250.29.16 (24 Jan 1999 14:00:29 GMT)
Organization: Ecole Normale Superieure, Paris, France
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANqsnbeEDnX0m9pzZAQGm8AF+Jzf1EoCqADlRrlLY25INng6tdz/9N6Pr DbNtAnbrzOYTLqBbxcSEzLfZdz20ebHS =I+TD
Mime-Version: 1.0
NNTP-Posting-Date: 24 Jan 1999 14:00:29 GMT
Newsgroups: comp.std.c++

Anthony Shipman wrote:
> 
> The version of STL supplied for IRIX 6.5 does not have the
>         const T& operator[](const key_type&) const
> operator that is listed in the STL tutorial by Musser and Saini.
> 
> Has it been removed from the standard or is it a fault with the SGI STL?

This operator is equivalent with insert thus mutating by definition 
and thus cannot be const.

-- 

Valentin Bonnard                mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html              ]



