This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] More noexcept -- 3rd
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Sep 2013 17:14:44 +0100
- Subject: Re: [v3] More noexcept -- 3rd
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1309181725480 dot 10748 at stedding dot saclay dot inria dot fr>
On 18 September 2013 16:51, Marc Glisse wrote:
> Hello,
>
> some more containers...
>
> In debug array, we already have throw in noexcept functions, but if I
> understand correctly it is only because of syntax limitations for constexpr
> functions and aborts before throwing, although the use of
> _GLIBCXX_THROW_OR_ABORT is suspicious. In any case, I am not changing this
> with my patch.
>
> I replaced throw with abort in list, as discussed, and thus removed the
> corresponding testcase.
>
> bootstrap+testsuite ok.
>
> 2013-09-19 Marc Glisse <marc.glisse@inria.fr>
>
> PR libstdc++/58338
> * include/bits/stl_iterator.h (__normal_iterator)
> [__normal_iterator,
> _M_const_cast, operator*, operator->, operator++, operator--,
> operator[], operator+=, operator+, operator-=, operator-, base]:
> Mark as noexcept.
> (operator==(const __normal_iterator&, const __normal_iterator&),
> operator!=(const __normal_iterator&, const __normal_iterator&),
> operator<(const __normal_iterator&, const __normal_iterator&),
> operator>(const __normal_iterator&, const __normal_iterator&),
> operator<=(const __normal_iterator&, const __normal_iterator&),
> operator>=(const __normal_iterator&, const __normal_iterator&),
> operator-(const __normal_iterator&, const __normal_iterator&),
> operator+(difference_type, const __normal_iterator&)): Likewise.
> * include/bits/stl_list.h (list) [splice,
> _M_check_equal_allocators]:
> Likewise.
> (list::_M_check_equal_allocators): Abort instead of throwing.
> * include/debug/array (array) [operator[], front, back]: Mark as
> noexcept.
> * include/profile/array (array) [operator[], front, back]: Likewise.
> * include/std/array (array) [operator[], front, back]: Likewise.
> * include/debug/list (list::splice): Likewise.
> * include/profile/list (list::splice): Likewise.
> * testsuite/23_containers/list/operations/5.cc: Remove file.
> * testsuite/23_containers/list/operations/5.h: Likewise.
This patch looks good to me, thanks again.