pytorch
fb120493 - Make Scalar.to<> for invalid types a compile-time error (#58726)

Commit
3 years ago
Make Scalar.to<> for invalid types a compile-time error (#58726) Summary: Currently calling `scalar.to<std::complex<double>>()` for example compiles but throws an error at runtime. Instead, marking the non-specialized cases as `= delete` means the code fails to compile and you catch the error sooner. Pull Request resolved: https://github.com/pytorch/pytorch/pull/58726 Reviewed By: zou3519, seemethere Differential Revision: D28646057 Pulled By: ezyang fbshipit-source-id: 9e4e3d1b4586eeecbb73db61bba56560b2657351
Author
Parents
Loading