Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop using std::is_trivially_copyable in Optional.cpp on "[Pytorch] S…
…pecialize guts of c10::optional for 32-bit scalars" c10::optional has non-trivial copy and move operations always. This change specializes it for 32-bit scalars so that it has trivial copy and move operations in that case. Ideally, we would instead rely on P0602 "variant and optional should propagate copy/move triviality" and use `std::optional` (or implement that functionality ourselves). We can't use `std::optional` because we are stuck with C++14. Implementing the full P0602 ourselves would add even more complexity. We could do it, but this should be a helpful first step. Differential Revision: [D24552280](https://our.internmc.facebook.com/intern/diff/D24552280/) [ghstack-poisoned]
- Loading branch information