diff options
author | Alexander Karatarakis <alex@karatarakis.com> | 2021-06-30 04:27:51 +0000 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2021-06-30 04:27:51 +0000 |
commit | 60400334a92268272c6bf525da89eec5e99c3e5a (patch) | |
tree | fa3b80e40be0cef16a804e57e190b61436be8580 /test/dense_storage.cpp | |
parent | c81da59a252b3479753b2eada26ee0cf46280bd0 (diff) |
Make DenseStorage<> trivially_copyable
Diffstat (limited to 'test/dense_storage.cpp')
-rw-r--r-- | test/dense_storage.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dense_storage.cpp b/test/dense_storage.cpp index 36ccbb02c..45c2bd728 100644 --- a/test/dense_storage.cpp +++ b/test/dense_storage.cpp @@ -13,6 +13,17 @@ #include <Eigen/Core> +#if EIGEN_HAS_TYPE_TRAITS && EIGEN_HAS_CXX11 +using DenseStorageD3x3 = Eigen::DenseStorage<double, 3, 3, 3, 3>; +static_assert(std::is_trivially_move_constructible<DenseStorageD3x3>::value, "DenseStorage not trivially_move_constructible"); +static_assert(std::is_trivially_move_assignable<DenseStorageD3x3>::value, "DenseStorage not trivially_move_assignable"); +#if !defined(EIGEN_DENSE_STORAGE_CTOR_PLUGIN) +static_assert(std::is_trivially_copy_constructible<DenseStorageD3x3>::value, "DenseStorage not trivially_copy_constructible"); +static_assert(std::is_trivially_copy_assignable<DenseStorageD3x3>::value, "DenseStorage not trivially_copy_assignable"); +static_assert(std::is_trivially_copyable<DenseStorageD3x3>::value, "DenseStorage not trivially_copyable"); +#endif +#endif + template <typename T, int Size, int Rows, int Cols> void dense_storage_copy(int rows, int cols) { |