public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: brendan@zen.org To: gcc-gnats@gcc.gnu.org Subject: libstdc++/4534: vector<bool>::_M_range_check should throw out_of_range Date: Thu, 11 Oct 2001 05:26:00 -0000 [thread overview] Message-ID: <20011011122356.695.qmail@sourceware.cygnus.com> (raw) >Number: 4534 >Category: libstdc++ >Synopsis: vector<bool>::_M_range_check should throw out_of_range >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Oct 11 05:26:25 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Brendan Kehoe >Release: CVS tree >Organization: >Environment: >Description: Section 23.1.1.13 of the standard says the member function at() of sequences should throw out_of_range if n >= a.size(), not range_error as is currently thrown in bits/stl_bvector.h's _M_range_check method. >How-To-Repeat: >Fix: Attached patch changes it to use __throw_out_of_range instead of __throw_range_error. This makes it also match what's implemented in stl_vector.h for the generic vector template's _M_range_check method. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="diffs-bvector.txt" Content-Disposition: inline; filename="diffs-bvector.txt" 2001-10-09 Brendan Kehoe <brendan@zen.org> * stl_bvector.h (vector<bool>::_M_range_check): Fix to throw out_of_range, not range_error, thus sayeth $23.1.1.13. Index: include/bits/stl_bvector.h =================================================================== RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/stl_bvector.h,v retrieving revision 1.5 diff -u -p -r1.5 stl_bvector.h --- stl_bvector.h 2001/06/27 17:09:52 1.5 +++ stl_bvector.h 2001/10/10 11:44:31 @@ -485,7 +485,7 @@ template <typename _Alloc> void _M_range_check(size_type __n) const { if (__n >= this->size()) - __throw_range_error("vector<bool>"); + __throw_out_of_range("vector<bool>"); } reference at(size_type __n)
next reply other threads:[~2001-10-11 5:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-11 5:26 brendan [this message] 2001-10-25 22:34 bkoz 2001-11-04 2:55 bkoz 2001-11-04 4:03 bkoz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011011122356.695.qmail@sourceware.cygnus.com \ --to=brendan@zen.org \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).