]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Add C++20 P1032 constexpr to _GLIBCXX_DEBUG array
authorFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 26 Nov 2019 06:12:34 +0000 (06:12 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Tue, 26 Nov 2019 06:12:34 +0000 (06:12 +0000)
* include/debug/array (array<>::fill): Add C++20 constexpr.
(array<>::swap): Likewise.

From-SVN: r278718

libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/array

index 986ac2a00c6dd12a92b847cf3a776dda08463f53..8e384c765063728e98d2904b62925c2d409da6f7 100644 (file)
@@ -1,5 +1,8 @@
 2019-11-26  François Dumont  <fdumont@gcc.gnu.org>
 
+       * include/debug/array (array<>::fill): Add C++20 constexpr.
+       (array<>::swap): Likewise.
+
        * include/debug/safe_iterator.h
        [__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for
        C++20.
index 5566a087f9aab902375191f9d2a3724fae3d7640..4e0fac8daac8cf35dd23b0df142e6772d5b3eb62 100644 (file)
@@ -80,11 +80,11 @@ namespace __debug
       // No explicit construct/copy/destroy for aggregate type.
 
       // DR 776.
-      void
+      _GLIBCXX20_CONSTEXPR void
       fill(const value_type& __u)
       { std::fill_n(begin(), size(), __u); }
 
-      void
+      _GLIBCXX20_CONSTEXPR void
       swap(array& __other)
       noexcept(_AT_Type::_Is_nothrow_swappable::value)
       { std::swap_ranges(begin(), end(), __other.begin()); }
@@ -282,6 +282,7 @@ namespace __debug
 #endif
 
   template<typename _Tp, std::size_t _Nm>
+    _GLIBCXX20_CONSTEXPR
     inline void
     swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
     noexcept(noexcept(__one.swap(__two)))
This page took 0.067118 seconds and 5 git commands to generate.