This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8338: Koenig lookup doesn't find enum value in special case
- From: Detlef Vollmann <dv at vollmann dot ch>
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, dv at vollmann dot ch, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: Thu, 24 Oct 2002 22:34:17 +0200
- Subject: Re: c++/8338: Koenig lookup doesn't find enum value in special case
- Organization: vollmann engineering gmbh
After looking into the case a little more, I found out that
the problem in fact is not related to the incomplete type
of a template parameter.
Attached is a small program where the Koenig lookup doesn't
work though all classes are fully defined.
Detlef
--
Detlef Vollmann
vollmann engineering gmbh Tel: +41-41-4120911
P.O. Box 5106 Fax: +41-41-4120912
CH-6000 Luzern 5 / Switzerland eMail: dv@vollmann.ch
template <class EnumType>
class A
{
public:
static const EnumType size = max;
int table[size];
};
template <class EnumType>
const EnumType A<EnumType>::size;
namespace N
{
enum E { max = 5 };
struct B
{
A<E> a;
};
} // N1
int
main()
{
N::B b;
return 0;
}