用户定义的转换不能指定返回类型
以下示例生成 C2549:
// C2549.cpp
// compile with: /c
class X {
public:
int operator int() { return value; } // C2549
// try the following line instead
// operator int() { return value; }
private:
int value;
};
用户定义的转换不能指定返回类型
以下示例生成 C2549:
// C2549.cpp
// compile with: /c
class X {
public:
int operator int() { return value; } // C2549
// try the following line instead
// operator int() { return value; }
private:
int value;
};