]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove [[nodiscard]] from <valarray>
authorJonathan Wakely <jwakely@redhat.com>
Mon, 1 Nov 2021 20:20:57 +0000 (20:20 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 1 Nov 2021 20:23:34 +0000 (20:23 +0000)
A backport from trunk included these attributes, but they aren't present
on the other std::begin and std::end overloads, so remove them from
these overloads.

libstdc++-v3/ChangeLog:

* include/std/valarray (begin, end): Remove nodiscard attribute.

libstdc++-v3/include/std/valarray

index 96e2bcb290f1511f9bb4d9940969b1ffaa2f3297..e1b5d5f4f02792e56e00419a4a30cbd91e232d8c 100644 (file)
@@ -1210,7 +1210,6 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
    *  @param  __va  valarray.
    */
   template<class _Tp>
-    [[__nodiscard__]]
     inline _Tp*
     begin(valarray<_Tp>& __va) noexcept
     { return __va.size() ? std::__addressof(__va[0]) : nullptr; }
@@ -1221,7 +1220,6 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
    *  @param  __va  valarray.
    */
   template<class _Tp>
-    [[__nodiscard__]]
     inline const _Tp*
     begin(const valarray<_Tp>& __va) noexcept
     { return __va.size() ? std::__addressof(__va[0]) : nullptr; }
@@ -1232,7 +1230,6 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
    *  @param  __va  valarray.
    */
   template<class _Tp>
-    [[__nodiscard__]]
     inline _Tp*
     end(valarray<_Tp>& __va) noexcept
     {
@@ -1248,7 +1245,6 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
    *  @param  __va  valarray.
    */
   template<class _Tp>
-    [[__nodiscard__]]
     inline const _Tp*
     end(const valarray<_Tp>& __va) noexcept
     {