From 069b5e2ca1fdc4d2aa38c76d2dfa1664ddf104ef Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Fri, 8 Dec 2006 16:54:30 +0000 Subject: [PATCH] Throw out_of_range rather than range_error. See 21.1.1 paragraph 13. [SVN r36304] --- include/boost/array.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/array.hpp b/include/boost/array.hpp index b41c656..52218aa 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -157,7 +157,7 @@ namespace boost { // check range (may be private because it is static) static void rangecheck (size_type i) { if (i >= size()) { - throw std::range_error("array<>: index out of range"); + throw std::out_of_range("array<>: index out of range"); } } @@ -271,7 +271,7 @@ namespace boost { // check range (may be private because it is static) static reference failed_rangecheck () { - std::range_error e("attempt to access element of an empty array"); + std::out_of_range e("attempt to access element of an empty array"); boost::throw_exception(e); // // We need to return something here to keep