On 26/06/18 09:19 +0200, Stephan Bergmann wrote:
On 08/06/18 13:01, Jonathan Wakely wrote:
Nothing very exciting, just adding noexcept and defaulting some
members.
* include/bits/regex.h (sub_match): Add noexcept to default
constructor and length observer.
(match_results): Add noexcept to default constructor and observers
with no preconditions. Define destructor as defaulted.
(operator==, operator!=, swap): Add noexcept.
(regex_iterator): Add default member initializers and define default
constructor and destructor as defaulted. Add noexcept to equality
and dereference operators.
Tested powerpc64le-linux, committed to trunk.
Looks like that forgot to also add noexcept to the definition of
regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>::
operator==(const regex_iterator& __rhs) const
in libstdc++-v3/include/bits/regex.tcc?
Indeed I did, thanks.
Tested x86_64-linux, committed to trunk.
commit a3371eeaf2434550934a95f4f41a2a9ae31ead81
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Tue Jun 26 13:01:56 2018 +0100
Add missing noexcept on definition to match declaration
* include/bits/regex.tcc (regex_iterator::operator==): Add missing
noexcept.
diff --git a/libstdc++-v3/include/bits/regex.tcc b/libstdc++-v3/include/bits/regex.tcc
index b92edb9ab29..dcf660902bc 100644
--- a/libstdc++-v3/include/bits/regex.tcc
+++ b/libstdc++-v3/include/bits/regex.tcc
@@ -500,7 +500,7 @@ namespace __detail
typename _Rx_traits>
bool
regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>::
- operator==(const regex_iterator& __rhs) const
+ operator==(const regex_iterator& __rhs) const noexcept
{
if (_M_pregex == nullptr && __rhs._M_pregex == nullptr)
return true;