我们可以检测到emply classes,可能使用模板吗?
struct A {};
struct B { char c;};
std::cout << is_empty<A>::value; //should print 0
std::cout << is_empty<B>::value; //should print 1
//this is important, the alleged duplicate doesn't deal with this case!
std::cout << is_empty<int>::value; //should print 0
只有 C++03,不是 C++0x!