编译器错误 C2671

“function”:静态成员函数没有“this”指针

static 成员函数尝试访问 this

下面的示例生成 C2671:

// C2671.cpp
struct S {
   static S* const func() { return this; }  // C2671
};