我试图像这样从std::sqrt
重载<cmath>
:
class MyClass {
...
}
MyClass std::sqrt(const MyClass& arg) {
...
}
但是失败并显示错误namespace "std" has no member "sqrt"
。
我在Visual Studio中使用MS c ++编译器
有人知道怎么做吗?
namespace std {
MyClass sqrt(const MyClass& arg) {
// ...
}
}