От: | Alexander G | ||
Дата: | 19.11.09 16:19 | ||
Оценка: | 82 (4) |
#include <stdio.h>
template<class>
struct X
{
struct Y;
};
template<class T>
struct X<T>::Y
{
int i[20];
int f() { return 1; }
};
template<class T>
struct X<T>::Y
{
int j[40];
char f() { return 2; }
};
int main()
{
X<void>::Y y;
printf("%d\n", sizeof(y)/sizeof(int) );
printf("%d\n", y.f() );
return 0;
}