mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Remove some pre-cpp17 stuff (#138410)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138410 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
f4b3813989
commit
d428d81c7f
@ -12,6 +12,8 @@
|
||||
#include <c10/util/TypeTraits.h>
|
||||
#include <torch/custom_class_detail.h>
|
||||
#include <torch/library.h>
|
||||
|
||||
#include <functional>
|
||||
#include <sstream>
|
||||
|
||||
namespace torch {
|
||||
@ -117,7 +119,7 @@ class class_ : public ::torch::detail::class_base {
|
||||
c10::tagged_capsule<CurClass> self,
|
||||
ParameterTypes... arg) {
|
||||
c10::intrusive_ptr<CurClass> classObj =
|
||||
at::guts::invoke(func, std::forward<ParameterTypes>(arg)...);
|
||||
std::invoke(func, std::forward<ParameterTypes>(arg)...);
|
||||
auto object = self.ivalue.toObject();
|
||||
object->setSlot(0, c10::IValue::make_capsule(classObj));
|
||||
};
|
||||
@ -325,7 +327,7 @@ class class_ : public ::torch::detail::class_base {
|
||||
c10::tagged_capsule<CurClass> self,
|
||||
SetStateArg arg) {
|
||||
c10::intrusive_ptr<CurClass> classObj =
|
||||
at::guts::invoke(set_state, std::move(arg));
|
||||
std::invoke(set_state, std::move(arg));
|
||||
auto object = self.ivalue.toObject();
|
||||
object->setSlot(0, c10::IValue::make_capsule(classObj));
|
||||
};
|
||||
|
Reference in New Issue
Block a user