aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/conv7.C
blob: 0a7e76dfe3f8be55877d3d54c812ba7e94df6b0d (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
37
38
39
40
41
42
43
44
45
// Build don't link:
// 
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 5 May 2001 <nathan@codesourcery.com>

// Bug 2726. We ICE'd trying to say something about possibly confusing
// conversion overload resolution.

class foo
{
};

template<class T>
class bar
{
public:
    operator const T&() const ;
    operator T&() ;

};


template<class T, class Ref, class NodePtr, class ListPtr>
class iterator_template
{
public:
    iterator_template();
    Ref operator*() const;

};

struct IdlDeclarator
{
};

typedef bar< IdlDeclarator > IdlDeclarator_bar;
int
yyparse()

{

  iterator_template<IdlDeclarator_bar,IdlDeclarator_bar&,foo*,foo*> declIter;
  const IdlDeclarator& declarator = *declIter; // WARNING - choosing
  return 1;
}