От: | dad | ||
Дата: | 19.08.09 16:17 | ||
Оценка: |
#include <iostream>
class my
{
void show()
{
std::cout << "show" << std::endl;
}
};
template<class Type,void (Type::*Mem1)() >
struct call
{
static void doit(Type*p)
{
(p->*Mem1)();
}
};
int main()
{
call<my, &my::show>::doit( new my() );
}