repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
depr-copy3.C
blob
c303c9d5d407266abc0c60de453705d43086d894
1
// PR c++/92145
2
// { dg-do compile { target c++11 } }
3
// { dg-additional-options "-Wdeprecated-copy" }
4
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
15
{
16
//using base::base;
17
using base::operator=;
18
};
19
20
struct bar
21
{
22
bar& operator=(foo v)
23
{
24
value = v;
25
return *this;
26
}
27
28
foo value;
29
};
30
31
int main()
32
{
33
foo a;
34
foo{a};
35
}