1 // PR c++/54506
2 // { dg-do compile { target c++11 } }
3 
4 template <class T>
5 struct A
6 {
AA7   A() {}
8 
9   A(A const volatile &&) = delete;
10   A &operator =(A const volatile &&) = delete;
11 
AA12   template <class U> A(A<U> &&) {}
13   template <class U> A &operator =(A<U> &&) { return *this; }
14 };
15 
16 struct B
17 {
18   A<int> a;
19   B() = default;
20 };
21 
main()22 int main()
23 {
24   B b = B();
25   b = B();
26 }
27