This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/8338: Koenig lookup doesn't find enum value in special case


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]