mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Fix usage of forwarding references (#161094)
I found a number of places that seem to want forwarding references but the type signature does not reflect that Pull Request resolved: https://github.com/pytorch/pytorch/pull/161094 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
cc5bdd1240
commit
1ebd70d0c0
@ -232,7 +232,7 @@ struct base {
|
||||
return obj<T>::steal(self);
|
||||
}
|
||||
template<typename ... Args>
|
||||
static obj<T> create(Args ... args) {
|
||||
static obj<T> create(Args&&... args) {
|
||||
auto self = alloc();
|
||||
self->init(std::forward<Args>(args)...);
|
||||
return self;
|
||||
|
Reference in New Issue
Block a user