From f6e86b330363306d772ed69dfb864532bf5de5b6 Mon Sep 17 00:00:00 2001 From: Edward Smith-Rowland <3dw4rd@verizon.net> Date: Sun, 17 Nov 2019 03:31:15 +0000 Subject: [PATCH] Repair the part of C++20 p1032 Misc constexpr bits. 2019-11-16 Edward Smith-Rowland <3dw4rd@verizon.net> Repair the part of C++20 p1032 Misc constexpr bits. * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=) (__use_alloc(const _Alloc&)) : Constexpr. From-SVN: r278373 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/uses_allocator.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2dc29596959..48b5c9b27be 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2019-11-16 Edward Smith-Rowland <3dw4rd@verizon.net> + + Repair the part of C++20 p1032 Misc constexpr bits. + * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=) + (__use_alloc(const _Alloc&)) : Constexpr. + 2019-11-17 Jonathan Wakely * include/std/string_view (basic_string_view(It, End)): Add range diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h index 015828bee18..3e5d59f88bd 100644 --- a/libstdc++-v3/include/bits/uses_allocator.h +++ b/libstdc++-v3/include/bits/uses_allocator.h @@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION 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 @@ -109,6 +109,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uses_alloc::value, _Tp, _Alloc, _Args...>; template + _GLIBCXX20_CONSTEXPR inline __uses_alloc_t<_Tp, _Alloc, _Args...> __use_alloc(const _Alloc& __a) { -- 2.30.2