From -340391846854056862
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c0e61b6a667823c0
X-Google-Attributes: gidf78e5,public
From: "Jonathan H Lundquist" <fluxsmith@fluxsmith.com>
Subject: Re: no const operator[] in STL map?
Date: 1999/01/27
Message-ID: <78mcuo$fvh$1@camel18.mindspring.com>#1/1
X-Deja-AN: 437429991
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <916993358.766341@aloomba.aaii.oz.au>
X-Original-Date: Tue, 26 Jan 1999 22:50:49 -0800
X-Priority: 3
X-Server-Date: 27 Jan 1999 06:50:00 GMT
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 917422833 18397 128.250.29.16 (27 Jan 1999 07:40:33 GMT)
Organization: MindSpring Enterprises
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANq7C3eEDnX0m9pzZAQHoEAF8C2vbfgqKi1boCGACJnD8/Xw9M37XNlvQ QbZV6QQ50h3qYxCOQSiQFNXt/623kER1 =cXAM
X-MSMail-Priority: Normal
NNTP-Posting-Date: 27 Jan 1999 07:40:33 GMT
Newsgroups: comp.std.c++

This thread has convinced me to add:
const T& operator[](const key_type&) const
To my implementation of map and hash_map at www.fluxsmith.com

My question is what exception should be thrown.  I find the standard useless
in this regard.  For instance, it essentially says domain_error is for
domain errors.  Until someone here corrects me... I have settled on
domain_error, however, it seems to me there is some degree of overlap
between domain_error, out_of_range, and invalid_argument.  This is an
example of where I think a reasonable argument could be made for any of the
three.

Anthony Shipman <als@aaii.com.au> wrote in message
news:916993358.766341@aloomba.aaii.oz.au...
>
>The version of STL supplied for IRIX 6.5 does not have the
> const T& operator[](const key_type&) const
---
[ 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              ]



