FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / conv7.C
blob0a7e76dfe3f8be55877d3d54c812ba7e94df6b0d
1 // Build don't link:
2 // 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 5 May 2001 <nathan@codesourcery.com>
6 // Bug 2726. We ICE'd trying to say something about possibly confusing
7 // conversion overload resolution.
9 class foo
13 template<class T>
14 class bar
16 public:
17     operator const T&() const ;
18     operator T&() ;
23 template<class T, class Ref, class NodePtr, class ListPtr>
24 class iterator_template
26 public:
27     iterator_template();
28     Ref operator*() const;
32 struct IdlDeclarator
36 typedef bar< IdlDeclarator > IdlDeclarator_bar;
37 int
38 yyparse()
42   iterator_template<IdlDeclarator_bar,IdlDeclarator_bar&,foo*,foo*> declIter;
43   const IdlDeclarator& declarator = *declIter; // WARNING - choosing
44   return 1;