gcc/libstdc++-v3/include
Jonathan Wakely d335d73889 libstdc++: Use conditional noexcept in std::reverse_iterator [PR 94418]
This adds a noexcept-specifier to each constructor and assignment
operator of std::reverse_iterator so that they are noexcept when the
corresponding operation on the underlying iterator is noexcept.

The std::reverse_iterator class template already requires that the
operations on the underlying type are valid, so we don't need to use the
std::is_nothrow_xxx traits to protect against errors when the expression
isn't even valid. We can just use a noexcept operator to test if the
expression can throw, without the overhead of redundantly checking if
the initialization/assignment would be valid.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/94418
	* include/bits/stl_iterator.h (reverse_iterator): Use
	conditional noexcept on constructors and assignment operators.
	* testsuite/24_iterators/reverse_iterator/noexcept.cc: New test.
2021-10-01 20:34:46 +01:00
..
backward
bits libstdc++: Use conditional noexcept in std::reverse_iterator [PR 94418] 2021-10-01 20:34:46 +01:00
c
c_compatibility
c_global libstdc++: Add additional overload of std::lerp [PR101870] 2021-08-12 19:46:16 +01:00
c_std
debug libstdc++: Fix CTAD for debug sequence containers 2021-08-18 14:26:38 +01:00
decimal
experimental libstdc++: Add 'noexcept' to path::iterator members 2021-09-17 20:43:34 +01:00
ext libstdc++: Fix std::allocator<void> for versioned namespace 2021-08-28 14:37:19 +01:00
parallel
precompiled
pstl
std libstdc++: Fix last std::tuple constructor missing 'constexpr' [PR102270] 2021-09-17 20:43:34 +01:00
tr1
tr2
Makefile.am libstdc++: Move COW string definitions to separate header 2021-07-27 12:04:18 +01:00
Makefile.in libstdc++: Move COW string definitions to separate header 2021-07-27 12:04:18 +01:00