🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2903

Re: Containers and exceptions

#2903
From: Steve Clamage
Date: Thu, 07 Dec 1995 18:38
28 lines
1427 bytes
In article ke0@info.uci.kun.nl, Marian Hellema <marian@atcmp.nl> writes:
>
>I am wondering if any of the containers in the standard library
>can throw exceptions.
>In the working paper the only container for which exceptions
>are specified is bitset.
>This suggests that none of the other containers throws exceptions.

No, it's the reverse. If the specification of a function in the standard
library has no throw-specification, the function is allowed to throw any
exception. (That is true for any function, of course, standard or
user-defined.)

A function in a container class could potentially throw any exception,
depending on the characteristics of user-defined classes provided as 
template arguments.

---
Steve Clamage, stephen.clamage@eng.sun.com




---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <4a790m$itd@engnews1.eng.sun.com>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
References: <4a3o1h$ke0@info.uci.kun.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
From: clamage@Eng.Sun.COM (Steve Clamage)
Newsgroups: comp.std.c++
Subject: Re: Containers and exceptions
Date: 07 Dec 1995 18:38:12 GMT
Organization: Sun Microsystems Inc.
Approved: Matt@Austern
Message-ID: <4a790m$itd@engnews1.eng.sun.com>
References: <4a3o1h$ke0@info.uci.kun.nl>
Reply-To: clamage@Eng.Sun.COM
NNTP-Posting-Host: austern.hip.berkeley.edu