Remove default constructor lines that do nothing, and fix warnings with clang trunk...
authorBrennan Vincent <btv@fb.com>
Fri, 30 Nov 2018 19:11:51 +0000 (11:11 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 30 Nov 2018 19:16:35 +0000 (11:16 -0800)
Summary:
The lines removed in this diff were no-op, but confusing: the default constructors in `store_handler.h` are implicitly deleted, since `std::runtime_error` has no default constructor.

Clang added a warning for this behavior [in September 2018](https://reviews.llvm.org/rL343285) (note that the warning is not just for cxx2a, despite the slightly confusing commit message), so building pytorch with a recent build of clang trunk causes spew of this warning, which is fixed by the present PR.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14300

Differential Revision: D13260039

Pulled By: umanwizard

fbshipit-source-id: 92788dbd6794253e788ef26bde250a66d8fb917e

caffe2/distributed/store_handler.h

index e6c4a68..e11ea57 100644 (file)
@@ -59,7 +59,6 @@ class CAFFE2_API StoreHandler {
  */
 struct CAFFE2_API StoreHandlerNotAvailableException
     : public std::runtime_error {
-  StoreHandlerNotAvailableException() = default;
   explicit StoreHandlerNotAvailableException(const std::string& msg)
       : std::runtime_error(msg) {}
 };
@@ -72,7 +71,6 @@ struct CAFFE2_API StoreHandlerNotAvailableException
  * Timeout accessing the store.
  */
 struct CAFFE2_API StoreHandlerTimeoutException : public std::runtime_error {
-  StoreHandlerTimeoutException() = default;
   explicit StoreHandlerTimeoutException(const std::string& msg)
       : std::runtime_error(msg) {}
 };