diff options
author | Christian Persch <chpe@src.gnome.org> | 2018-04-23 20:51:18 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2018-04-23 20:51:18 +0200 |
commit | 838150fbdc2ffff1b18e739d1deb19d9bef00afc (patch) | |
tree | b8976a8bf8cd722b9721af2a30c1b28383191ada | |
parent | c3755f9a9dcc8a41b1bf9a90e11f0f69ca768d98 (diff) | |
download | vte-838150fbdc2ffff1b18e739d1deb19d9bef00afc.tar.gz |
ring: Add some static assertions
Just to make sure nothing breaks during refactoring.
-rw-r--r-- | src/vterowdata.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vterowdata.cc b/src/vterowdata.cc index 185aba70..1f00ae53 100644 --- a/src/vterowdata.cc +++ b/src/vterowdata.cc @@ -25,6 +25,16 @@ #include <string.h> +#include <type_traits> + +/* This will be true now that VteCell is POD, but make sure it'll be true + * once that changes. + */ +static_assert(std::is_trivially_copy_constructible<VteCell>::value, "VteCell is not trivially copyable"); +static_assert(std::is_trivially_move_constructible<VteCell>::value, "VteCell is not trivially copyable"); +static_assert(std::is_trivially_copyable<VteCell>::value, "VteCell is not trivially copyable"); +static_assert(std::is_trivially_copy_assignable<VteCell>::value, "VteCell is not trivially movable"); +static_assert(std::is_trivially_move_assignable<VteCell>::value, "VteCell is not trivially movable"); /* * VteCells: A row's cell array |