summaryrefslogtreecommitdiff
path: root/source/d/gcc/patches/gcc.PR90397.patch
blob: 454fb5201f036b113c9336d13f8aebc44049244f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From f4f53ba83ac1e711f5e78cddc4f4063108327e81 Mon Sep 17 00:00:00 2001
From: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 10 May 2019 22:23:10 +0000
Subject: [PATCH] PR libstdc++/90397 fix std::variant friend declaration

Clang diagnoses insert inconsistent noexcept-specifier on the friend
declaration of __get. Add .

	PR libstdc++/90397
	* include/std/variant (variant): Add noexcept to friend declaration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@271083 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libstdc++-v3/ChangeLog           | 3 +++
 libstdc++-v3/include/std/variant | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index d440be5e49d8..4ac03895bcae 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,8 @@
 2019-05-10  Jonathan Wakely  <jwakely@redhat.com>
 
+	PR libstdc++/90397
+	* include/std/variant (variant): Add noexcept to friend declaration.
+
 	Backport from mainline
 	2019-04-26  Jonathan Wakely  <jwakely@redhat.com>
 
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 8c7d7f37fe28..75fb0dc164ac 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -1556,7 +1556,8 @@ namespace __variant
 #endif
 
       template<size_t _Np, typename _Vp>
-	friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& __v);
+	friend constexpr decltype(auto)
+	__detail::__variant::__get(_Vp&& __v) noexcept;
 
       template<typename _Vp>
 	friend void* __detail::__variant::__get_storage(_Vp&& __v);