此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
用户定义的转换不能指定返回类型
以下示例生成 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; };
此页面是否有帮助?