Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/implicit16.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // PR c++/89381 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template<typename T> | |
5 struct base | |
6 { | |
7 base() { } | |
8 base(const base&) { } | |
9 base(base&&) { } | |
10 base& operator=(const base&) { return *this; } | |
11 base& operator=(base&&) { return *this; } | |
12 }; | |
13 | |
14 struct foo : base<int> | |
15 { | |
16 using base<int>::base; | |
17 using base<int>::operator=; | |
18 }; | |
19 | |
20 //using workaround = decltype(foo{*static_cast<foo const*>(0)}); | |
21 | |
22 struct bar | |
23 { | |
24 bar& operator=(foo ve) | |
25 { | |
26 value = ve; | |
27 return *this; | |
28 } | |
29 | |
30 foo value; | |
31 }; | |
32 | |
33 int main() | |
34 { | |
35 foo a; | |
36 foo b{a}; | |
37 } |