OSDN Git Service

PR c++/53549
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / friend18.C
1 // { dg-do run }
2
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Mar 2003 <nathan@codesourcery.com>
5
6 // PR 10158. implicit inline template friends ICE'd
7
8 template <int N> struct X
9 {
10   template <int M> friend int foo(X const &)
11   {
12     return N * 10000 + M;
13   }
14 };
15 X<1234> bring;
16
17 int main() {
18   return foo<5678> (bring) != 12345678;
19 }