Does C++ have an equivalent to .NET's NotImplementedException?

后端 未结 5 1670
别那么骄傲
别那么骄傲 2020-12-28 13:17

Does the standard library of C++ contain an exception equivalent to .NET\'s NotImplementedException?

If not, what are the best practices to handle incomplete methods

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-28 14:15

    Since this is just a temporary exception that does not carry any application meaning, you can just throw a char const* :

    int myFunction(double d) {
        throw "myFunction is not implemented yet.";
    }
    

提交回复
热议问题