Warning: definition of implicit copy constructor is deprecated
问题 I have a warning in my C++11 code that I would like to fix correctly but I don't really know how. I have created my own exception class that is derived from std::runtime_error : class MyError : public std::runtime_error { public: MyError(const std::string& str, const std::string& message) : std::runtime_error(message), str_(str) { } virtual ~MyError() { } std::string getStr() const { return str_; } private: std::string str_; }; When I compile that code with clang-cl using /Wall I get the