]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix inconsistent noexcept-specific for valarray begin/end
authorJonathan Wakely <jwakely@redhat.com>
Fri, 5 Nov 2021 21:42:20 +0000 (21:42 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Sat, 23 Jul 2022 10:13:47 +0000 (11:13 +0100)
These declarations should be noexcept after I added it to the
definitions in <valarray>.

libstdc++-v3/ChangeLog:

* include/bits/range_access.h (begin(valarray), end(valarray)):
Add noexcept.

(cherry picked from commit 2b2d97fc545635a0f6aa9c9ee3b017394bc494bf)

libstdc++-v3/include/bits/range_access.h

index aee72c3fae40bcba5ea8bf12b34339ea94f61394..98c81a153f35a98ce18bd0519c130092f6f6f754 100644 (file)
@@ -104,10 +104,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   template<typename _Tp> class valarray;
   // These overloads must be declared for cbegin and cend to use them.
-  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
-  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
-  template<typename _Tp> _Tp* end(valarray<_Tp>&);
-  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
+  template<typename _Tp> _Tp* begin(valarray<_Tp>&) noexcept;
+  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
+  template<typename _Tp> _Tp* end(valarray<_Tp>&) noexcept;
+  template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
 
   /**
    *  @brief  Return an iterator pointing to the first element of