|
|
От: | Аноним | |
| Дата: | 31.03.14 14:47 | ||
| Оценка: | |||
#include <stdio.h>
template <void (*Init)()>
struct CALL
{
CALL() { Init(); }
};
void funcInit() { printf("%s\n", __FUNCTION__); }
template <void (*Init)()>
struct WrapCALL
{
static CALL<Init> II;
};
template <void (*Init)()>
CALL<Init> WrapCALL<Init>::II;
int main()
{
WrapCALL<&funcInit> tmp;
return 0;
}