Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / depr-copy3.C
blobc303c9d5d407266abc0c60de453705d43086d894
1 // PR c++/92145
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-Wdeprecated-copy" }
5 struct base
7   base() { }
8   base(const base&) { }
9   base(base&&) { }
10   base& operator=(const base&) { return *this; }
11   base& operator=(base&&) { return *this; }
14 struct foo : base
16   //using base::base;
17   using base::operator=;
20 struct bar
22   bar& operator=(foo v)
23   {
24     value = v;
25     return *this;
26   }
28   foo value;
31 int main()
33   foo a;
34   foo{a};