aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/ref-qual18.C
blob: aaa00b9cfc3de84c46262026ccdbffc76d36a322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/71784
// { dg-do compile { target c++11 } }

template<typename T> struct A {
  template<typename U> void f(U const&) & { }
  template<typename U> void f(U const&) && { }
};

template void A<int>::f<int>(int const&) &;
template void A<float>::f<int>(int const&) &&;

template<typename T> struct B {
  void f(int const&) & { }
  void f(int const&) && { }
};

template void B<int>::f(int const&) &;
template void B<float>::f(int const&) &&;