aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C
blob: 1d7c812d067650341bf1d60eeb82f9a832f2872f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Out-of-line generic member function definitions.
// { dg-do compile { target c++1y } }
// { dg-options "" }

struct A {
  void f(auto x);
};

void A::f(auto x) {}  // injects a new list

template <typename T>
struct B {
  void f(auto x);
};

template <typename T>
void B<T>::f(auto x) {}  // injects a new list

struct C {
  template <int N>
  void f(auto x);
};

template <int N>
void C::f(auto x) {}  // extends existing inner list

template <typename T>
struct D
{
  template <int N>
  void f(auto x);
};

template <typename T>
template <int N>
void D<T>::f(auto x) {}  // extends existing inner list