summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/array
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-22 12:33:17 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-22 12:33:17 +0000
commit2d01d7d124d08042e59a1e6cf21772bf84eb46e5 (patch)
treeede034471a8c5ca4df5344f7909efe0ba1598e41 /libstdc++-v3/include/std/array
parent8a46f8802ed37371a413037ecc9d1863331e21b9 (diff)
downloadppe42-gcc-2d01d7d124d08042e59a1e6cf21772bf84eb46e5.tar.gz
ppe42-gcc-2d01d7d124d08042e59a1e6cf21772bf84eb46e5.zip
2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/array (array<>::at(size_type) const): Fix version for undefined __EXCEPTIONS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/array')
-rw-r--r--libstdc++-v3/include/std/array5
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
index ae7445d0b21..3e177444083 100644
--- a/libstdc++-v3/include/std/array
+++ b/libstdc++-v3/include/std/array
@@ -174,8 +174,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const_reference
at(size_type __n) const
{
- return __n < _Nm ?
- _M_instance[__n] : __throw_out_of_range(__N("array::at"));
+ if (__n >= _Nm)
+ std::__throw_out_of_range(__N("array::at"));
+ return _M_instance[__n];
}
#endif
OpenPOWER on IntegriCloud