Skip to content

Commit

Permalink
Replace std::is_pod usage
Browse files Browse the repository at this point in the history
Replacing std::is_pod usage as per the following compilation error:
```
../../util/misc/uuid.cc:44:20: error: 'is_pod<crashpad::UUID>' is deprecated: use 'is_standard_layout && is_trivial' instead [-Werror,-Wdeprecated-declarations]
static_assert(std::is_pod<UUID>::value, "UUID must be POD");
                   ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/type_traits:818:5: note: 'is_pod<crashpad::UUID>' 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 <awillia@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
  • Loading branch information
recvfrom authored and Crashpad LUCI CQ committed May 3, 2024
1 parent dc48905 commit da18935
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/misc/uuid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
namespace crashpad {

static_assert(sizeof(UUID) == 16, "UUID must be 16 bytes");
static_assert(std::is_pod<UUID>::value, "UUID must be POD");
static_assert(std::is_standard_layout<UUID>::value,
"UUID must be a standard-layout type");
static_assert(std::is_trivial<UUID>::value, "UUID must be a trivial type");

bool UUID::operator==(const UUID& that) const {
return memcmp(this, &that, sizeof(*this)) == 0;
Expand Down

0 comments on commit da18935

Please sign in to comment.