Class :: *做什么?

时间:2016-06-08 15:30:45

标签: c++ c++11

我最近看到了一些实施stderr的示例,我想知道以下语法的作用:

is_class

例如:

Classname::*

在这种情况下,语法template<typename T> class is_class { typedef char yes[1]; typedef char no [2]; template<typename C> static yes& test(int C::*); // selected if C is a class type template<typename C> static no& test(...); // selected otherwise public: static bool const value = sizeof(test<T>(0)) == sizeof(yes); } 表示什么?是否只需要C拥有任何成员/成为命名空间?我无法找到任何有关此信息。

0 个答案:

没有答案
相关问题