diff --git a/gloo/common/error.h b/gloo/common/error.h index 1ac9fb5ef..f3fdab659 100644 --- a/gloo/common/error.h +++ b/gloo/common/error.h @@ -22,7 +22,7 @@ const std::chrono::milliseconds kNoTimeout = std::chrono::milliseconds::zero(); // A base class for all gloo runtime errors struct Exception : public std::runtime_error { - Exception() = default; + Exception() = delete; explicit Exception(const std::string& msg) : std::runtime_error(msg) {} }; @@ -32,7 +32,7 @@ struct Exception : public std::runtime_error { // Thrown for invalid operations on gloo APIs struct InvalidOperationException : public ::gloo::Exception { - InvalidOperationException() = default; + InvalidOperationException() = delete; explicit InvalidOperationException(const std::string& msg) : ::gloo::Exception(msg) {} }; @@ -43,7 +43,7 @@ struct InvalidOperationException : public ::gloo::Exception { // Thrown for unrecoverable IO errors struct IoException : public ::gloo::Exception { - IoException() = default; + IoException() = delete; explicit IoException(const std::string& msg) : ::gloo::Exception(msg) {} };