From da189353b60611dd7089aa2a14441893460ebcdb Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 22 Apr 2024 22:18:50 +0000 Subject: [PATCH] Replace std::is_pod usage Replacing std::is_pod usage as per the following compilation error: ``` ../../util/misc/uuid.cc:44:20: error: 'is_pod' is deprecated: use 'is_standard_layout && is_trivial' instead [-Werror,-Wdeprecated-declarations] static_assert(std::is_pod::value, "UUID must be POD"); ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/type_traits:818:5: note: 'is_pod' has been explicitly marked deprecated here _GLIBCXX20_DEPRECATED_SUGGEST("is_standard_layout && is_trivial") ``` Bug: None Change-Id: I1d61ee12261877f7f1f84f0ea15d262d22959766 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5472885 Commit-Queue: Andrew Williams Reviewed-by: Mark Mentovai --- util/misc/uuid.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/misc/uuid.cc b/util/misc/uuid.cc index 3013d7b2..af33df51 100644 --- a/util/misc/uuid.cc +++ b/util/misc/uuid.cc @@ -41,7 +41,9 @@ namespace crashpad { static_assert(sizeof(UUID) == 16, "UUID must be 16 bytes"); -static_assert(std::is_pod::value, "UUID must be POD"); +static_assert(std::is_standard_layout::value, + "UUID must be a standard-layout type"); +static_assert(std::is_trivial::value, "UUID must be a trivial type"); bool UUID::operator==(const UUID& that) const { return memcmp(this, &that, sizeof(*this)) == 0;