[libstdc++] C++ constexpr tuple is broken.
diff mbox series

Message ID 373d5195-3fe2-7fd9-9c42-7b8c3a30c839@verizon.net
State New
Headers show
Series
  • [libstdc++] C++ constexpr tuple is broken.
Related show

Commit Message

Ian Lance Taylor via gcc-patches Nov. 17, 2019, 1:19 a.m. UTC
I missed a file in my recent patch for C++20 constexpr tuple. Bestrafe Mich.

Ed

Comments

Jonathan Wakely Nov. 17, 2019, 1:32 a.m. UTC | #1
On 16/11/19 20:19 -0500, Ed Smith-Rowland via libstdc++ wrote:
>I missed a file in my recent patch for C++20 constexpr tuple. Bestrafe Mich.
>
>Ed
>
>

OK for trunk, thanks.


>2019-11-16  Edward Smith-Rowland  <3dw4rd@verizon.net>
>
>	Repair the <tuple> part of C++20 p1032 Misc constexpr bits.
>	* include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=)
>	(__use_alloc(const _Alloc&)) : Constexpr.
>
>

>Index: include/bits/uses_allocator.h
>===================================================================
>--- include/bits/uses_allocator.h	(revision 278366)
>+++ include/bits/uses_allocator.h	(working copy)
>@@ -72,7 +72,7 @@
> 
>   struct __uses_alloc0 : __uses_alloc_base
>   {
>-    struct _Sink { void operator=(const void*) { } } _M_a;
>+    struct _Sink { void _GLIBCXX20_CONSTEXPR operator=(const void*) { } } _M_a;
>   };
> 
>   template<typename _Alloc>
>@@ -109,6 +109,7 @@
>       __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>;
> 
>   template<typename _Tp, typename _Alloc, typename... _Args>
>+    _GLIBCXX20_CONSTEXPR
>     inline __uses_alloc_t<_Tp, _Alloc, _Args...>
>     __use_alloc(const _Alloc& __a)
>     {
>

Patch
diff mbox series

Index: include/bits/uses_allocator.h
===================================================================
--- include/bits/uses_allocator.h	(revision 278366)
+++ include/bits/uses_allocator.h	(working copy)
@@ -72,7 +72,7 @@ 
 
   struct __uses_alloc0 : __uses_alloc_base
   {
-    struct _Sink { void operator=(const void*) { } } _M_a;
+    struct _Sink { void _GLIBCXX20_CONSTEXPR operator=(const void*) { } } _M_a;
   };
 
   template<typename _Alloc>
@@ -109,6 +109,7 @@ 
       __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>;
 
   template<typename _Tp, typename _Alloc, typename... _Args>
+    _GLIBCXX20_CONSTEXPR
     inline __uses_alloc_t<_Tp, _Alloc, _Args...>
     __use_alloc(const _Alloc& __a)
     {