[vte] lib: Replace deprecated std::is_pod
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] lib: Replace deprecated std::is_pod
- Date: Thu, 4 Feb 2021 18:49:42 +0000 (UTC)
commit 91d7e0f0b90f9ae3e94a1db6cda6e81ea2ae6431
Author: Christian Persch <chpe src gnome org>
Date: Thu Feb 4 19:48:48 2021 +0100
lib: Replace deprecated std::is_pod
... in preparation of requiring C++20.
src/ring.hh | 4 ++--
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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]