summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/friend15.C
blob: 4acbf2d1a56b9eba116f8de80be9eea3b3a879db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }

// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>

// PR c++/9453
// Access checking when template friend is defined in class.

template <typename> class X {
  private:
    struct Inner;

    template <typename R>
    friend typename X<R>::Inner * foo () { return 0; }
};
template class X<void>;

struct U {
    void bar () { foo<void> (); }
};