summaryrefslogtreecommitdiff
path: root/caffe2/core
diff options
context:
space:
mode:
authorSebastian Messmer <messmer@fb.com>2019-02-14 15:06:53 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-02-14 15:54:16 -0800
commit65e06df24af79ab5b318858dd1fbbcd2dff32f01 (patch)
tree08db12de16001653a2363a22919f6bff0b46b672 /caffe2/core
parent6f2bcc9b4f2557a4e5f8a6ca8cae698d60947a73 (diff)
downloadpytorch-65e06df24af79ab5b318858dd1fbbcd2dff32f01.tar.gz
pytorch-65e06df24af79ab5b318858dd1fbbcd2dff32f01.tar.bz2
pytorch-65e06df24af79ab5b318858dd1fbbcd2dff32f01.zip
Use new constructor in USE_SIMPLE_CTOR_DTOR (#17080)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17080 This changes all operators using this macro to the new format Reviewed By: dzhulgakov Differential Revision: D14078628 fbshipit-source-id: 67048e485e326765fd49567cc008633d3d500d5c
Diffstat (limited to 'caffe2/core')
-rw-r--r--caffe2/core/operator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/caffe2/core/operator.h b/caffe2/core/operator.h
index 55903bda4e..e062305989 100644
--- a/caffe2/core/operator.h
+++ b/caffe2/core/operator.h
@@ -945,8 +945,8 @@ class Operator : public OperatorBase {
#define USE_OPERATOR_CONTEXT_FUNCTIONS USE_OPERATOR_FUNCTIONS(Context)
#define USE_SIMPLE_CTOR_DTOR(name) \
- name(const OperatorDef& operator_def, Workspace* ws) \
- : Operator<Context>(operator_def, ws) {} \
+ template<class... Args> explicit name(Args&&... args) \
+ : Operator<Context>(std::forward<Args>(args)...) {} \
virtual ~name() noexcept {}
// Helpers to implement runtime op polymorphism. Often it's convenient to make