1 | #include <c10/util/ArrayRef.h> |
---|---|
2 | #include <c10/util/Optional.h> |
3 | |
4 | #include <type_traits> |
5 | |
6 | static_assert( |
7 | C10_IS_TRIVIALLY_COPYABLE(c10::optional<int>), |
8 | "c10::optional<int> should be trivially copyable"); |
9 | static_assert( |
10 | C10_IS_TRIVIALLY_COPYABLE(c10::optional<bool>), |
11 | "c10::optional<bool> should be trivially copyable"); |
12 | static_assert( |
13 | C10_IS_TRIVIALLY_COPYABLE(c10::optional<c10::IntArrayRef>), |
14 | "c10::optional<IntArrayRef> should be trivially copyable"); |
15 | static_assert( |
16 | sizeof(c10::optional<c10::IntArrayRef>) == sizeof(c10::IntArrayRef), |
17 | "c10::optional<IntArrayRef> should be size-optimized"); |
18 |