2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / ref4.C
blob867bae5811e9606898d73c5cbe01159f12860a6b
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 29 Apr 2001 <nathan@codesourcery.com>
6 // Bug 2664. We failed to convert_from_reference for non-type
7 // template parms.
9 struct cow { };
11 cow c;
13 void func     (cow &c) {}
14 void operator-(cow &c) {}
16 template<cow &C> void test()
18   func(C); //OK
19   -C;      //bogus error
22 int main()
24   test<c> ();