|
|
От: | innochenti | |
| Дата: | 21.12.11 20:19 | ||
| Оценка: | 4 (1) | ||
#include <iostream>
template<class U, int index>
struct Index
{
template<class Z, int T>
struct Helper;
template<class Z>
struct Helper<Z,index>
{
static const int value = 1;
};
template<class Z, int T>
struct Helper
{
static const int value = 0;
};
static const int value = Helper<U,1>::value;
};
int main()
{
Index<int,1> j;
std::cout << j.value << std::endl;
return 0;
}