Hi,

this code

---
template <typename _T>
struct A
{
   template <int _N, int _M>
       struct B;

   template <int _N>
       struct B<_N, _T::m>
       {
           static void f();
       };
};

struct C
{
   static const int m = 4;
};


void m()
{
   A<C>::B<1, 4>::f();
}
--

causes the following ICE as of 4.2

[g++ 4.4]
test.cc: In function ‘void m()’:
test.cc:22: internal compiler error: in unify, at cp/pt.c:14081

g++ 4.1 yields this error, instead

[g++ 4.1]
test.cc: In function ‘void m()’:
test.cc:22: error: incomplete type ‘A<C>::B<1, 4>’ used in nested name specifier

This code seems fine to me (and so seems to intel, xlc++ and comeau online) so 
I assume it is some issue in g++.

Is this a known bug or I should fill a PR?
(It seems that GCC's bugzilla has some issues at the moment of writing this 
message)

Kind regards,

--
Roger Ferrer Ibáñez - roger.fer...@bsc.es

Reply via email to