diff options
| author | mrg <mrg@NetBSD.org> | 2016-01-24 06:05:37 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2016-01-24 06:05:37 +0000 |
| commit | 5ef59e75d24c86c2adf67df842dc6439cc8065cc (patch) | |
| tree | 8953da2e57b931b05f4b239ee0b476e550ab990a /external/gpl3/gcc/dist/libstdc++-v3/include/debug/array | |
| parent | 765388af8c8bb2616c9e0d8a6d436fa57527a5d7 (diff) | |
import GCC 5.3.0. see these urls for details which are too large to
include here:
http://gcc.gnu.org/gcc-4.9/changes.html
http://gcc.gnu.org/gcc-5/changes.html
(note that GCC 5.x is a release stream like GCC 4.9.x, 4.8.x, etc.)
the main issues we will have are:
The default mode for C is now -std=gnu11 instead of -std=gnu89.
ARM:
The deprecated option -mwords-little-endian has been removed.
The options -mapcs, -mapcs-frame, -mtpcs-frame and -mtpcs-leaf-frame
which are only applicable to the old ABI have been deprecated.
MIPS:
The o32 ABI has been modified and extended. The o32 64-bit
floating-point register support is now obsolete and has been removed.
It has been replaced by three ABI extensions FPXX, FP64A, and FP64.
The meaning of the -mfp64 command-line option has changed. It is now
used to enable the FP64A and FP64 ABI extensions.
Diffstat (limited to 'external/gpl3/gcc/dist/libstdc++-v3/include/debug/array')
| -rw-r--r-- | external/gpl3/gcc/dist/libstdc++-v3/include/debug/array | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/external/gpl3/gcc/dist/libstdc++-v3/include/debug/array b/external/gpl3/gcc/dist/libstdc++-v3/include/debug/array index bce10cf3f12..411e816d315 100644 --- a/external/gpl3/gcc/dist/libstdc++-v3/include/debug/array +++ b/external/gpl3/gcc/dist/libstdc++-v3/include/debug/array @@ -1,6 +1,6 @@ // Debugging array implementation -*- C++ -*- -// Copyright (C) 2012-2013 Free Software Foundation, Inc. +// Copyright (C) 2012-2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -147,7 +147,7 @@ namespace __debug // Element access. reference - operator[](size_type __n) + operator[](size_type __n) noexcept { __glibcxx_check_subscript(__n); return _AT_Type::_S_ref(_M_elems, __n); @@ -165,7 +165,10 @@ namespace __debug at(size_type __n) { if (__n >= _Nm) - std::__throw_out_of_range(__N("array::at")); + std::__throw_out_of_range_fmt(__N("array::at: __n " + "(which is %zu) >= _Nm " + "(which is %zu)"), + __n, _Nm); return _AT_Type::_S_ref(_M_elems, __n); } @@ -175,19 +178,21 @@ namespace __debug // Result of conditional expression must be an lvalue so use // boolean ? lvalue : (throw-expr, lvalue) return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) - : (std::__throw_out_of_range(__N("array::at")), + : (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) " + ">= _Nm (which is %zu)"), + __n, _Nm), _AT_Type::_S_ref(_M_elems, 0)); } reference - front() + front() noexcept { __glibcxx_check_nonempty(); return *begin(); } constexpr const_reference - front() const + front() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, 0) : (_GLIBCXX_THROW_OR_ABORT(_Array_check_nonempty<_Nm>()), @@ -195,14 +200,14 @@ namespace __debug } reference - back() + back() noexcept { __glibcxx_check_nonempty(); return _Nm ? *(end() - 1) : *end(); } constexpr const_reference - back() const + back() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) : (_GLIBCXX_THROW_OR_ABORT(_Array_check_nonempty<_Nm>()), @@ -211,11 +216,11 @@ namespace __debug pointer data() noexcept - { return std::__addressof(_AT_Type::_S_ref(_M_elems, 0)); } + { return _AT_Type::_S_ptr(_M_elems); } const_pointer data() const noexcept - { return std::__addressof(_AT_Type::_S_ref(_M_elems, 0)); } + { return _AT_Type::_S_ptr(_M_elems); } }; // Array comparisons. @@ -273,7 +278,7 @@ namespace __debug get(array<_Tp, _Nm>&& __arr) noexcept { static_assert(_Int < _Nm, "index is out of bounds"); - return std::move(get<_Int>(__arr)); + return std::move(__debug::get<_Int>(__arr)); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> |
