A
Alpha
Hi,
Can anyone tell the reason why the following code can be compiled
using g++-4.1 while g++-4.2 throws a compilation error?
template<class A, class B = int>
class foo{
public:
A i;
B j;
};
template<class A = int, template<class>class B = foo>
class bar : public B<A>{
public:
A k;
};
int main(){
bar<> test;
test.k = test.j = test.i = 0;
return 0;
}
Can anyone tell the reason why the following code can be compiled
using g++-4.1 while g++-4.2 throws a compilation error?
template<class A, class B = int>
class foo{
public:
A i;
B j;
};
template<class A = int, template<class>class B = foo>
class bar : public B<A>{
public:
A k;
};
int main(){
bar<> test;
test.k = test.j = test.i = 0;
return 0;
}