请问下这个模板的语法是啥。。
template<class S, class T>
struct SameClass
{
template<class Identical, Identical> //A: 这个一般都是 typename A, typename B吧。。这样写有啥特殊语法么?
struct type_match;
template<class _1>
static char (& func(
type_match< T& (_1::*)(const _1&), &_1::operator => *) )[1]; // 这个必须用这种写法才能有效果,请问下这种写法的含义是啥。。跟之前(A:)的有啥匹配关系?
template<class >
static char (& func(...))[2];
static bool const value = sizeof(func<S>(0)) == 1;
};
template<class c1, class c2>
bool IsSameClassAs() { return SameClass<c1,c2>::value == 1; }
...全文


模式及实现
