diff options
author | Christian Persch <chpe@src.gnome.org> | 2021-02-04 19:48:48 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2021-02-04 19:48:48 +0100 |
commit | 91d7e0f0b90f9ae3e94a1db6cda6e81ea2ae6431 (patch) | |
tree | fbebcc4ccdbbfe10133752db4f6a125cfcd7fdc0 | |
parent | 9936d4d75b30793ca9f4f1baeda9270fa95562ee (diff) | |
download | vte-91d7e0f0b90f9ae3e94a1db6cda6e81ea2ae6431.tar.gz |
lib: Replace deprecated std::is_pod
... in preparation of requiring C++20.
-rw-r--r-- | src/ring.hh | 4 | ||||
-rw-r--r-- | src/vtetypes.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ring.hh b/src/ring.hh index f115eaaf..9b38a480 100644 --- a/src/ring.hh +++ b/src/ring.hh @@ -130,7 +130,7 @@ private: guint8 bidi_flags: 4; } RowRecord; - static_assert(std::is_pod<RowRecord>::value, "Ring::RowRecord is not POD"); + static_assert(std::is_standard_layout_v<RowRecord> && std::is_trivial_v<RowRecord>, "Ring::RowRecord is not POD"); /* Represents a cell position, see ../doc/rewrap.txt */ typedef struct _CellTextOffset { @@ -139,7 +139,7 @@ private: int eol_cells; /* -1 if over a character, >=0 if at EOL or beyond */ } CellTextOffset; - static_assert(std::is_pod<CellTextOffset>::value, "Ring::CellTextOffset is not POD"); + static_assert(std::is_standard_layout_v<CellTextOffset> && std::is_trivial_v<CellTextOffset>, "Ring::CellTextOffset is not POD"); inline bool read_row_record(RowRecord* record /* out */, row_t position) diff --git a/src/vtetypes.cc b/src/vtetypes.cc index b2a2e085..f25cc0b6 100644 --- a/src/vtetypes.cc +++ b/src/vtetypes.cc @@ -28,10 +28,10 @@ static_assert(sizeof(vte::grid::coords) == 2 * sizeof(long), "vte::grid::coords static_assert(sizeof(vte::grid::span) == 4 * sizeof(long), "vte::grid::span size wrong"); -static_assert(std::is_pod<vte::view::coords>::value, "vte::view::coords not POD"); +static_assert(std::is_standard_layout_v<vte::view::coords> && std::is_trivial_v<vte::view::coords>, "vte::view::coords not POD"); static_assert(sizeof(vte::view::coords) == 2 * sizeof(vte::view::coord_t), "vte::view::coords size wrong"); -static_assert(std::is_pod<vte::color::rgb>::value, "vte::color::rgb not POD"); +static_assert(std::is_standard_layout_v<vte::color::rgb> && std::is_trivial_v<vte::color::rgb>, "vte::color::rgb not POD"); static_assert(sizeof(vte::color::rgb) == sizeof(PangoColor), "vte::color::rgb size wrong"); static_assert(sizeof(vte::libc::FD) == sizeof(int), "vte::libc::FD size wrong"); |