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:
Lakshay Garg
2025-09-04 16:34:36 +00:00
committed by PyTorch MergeBot
parent cc5bdd1240
commit 1ebd70d0c0
5 changed files with 6 additions and 6 deletions

View File

@ -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;