Skip to content

Commit

Permalink
#1974: replace std::is_pod with `std::is_standard_layout && std::is…
Browse files Browse the repository at this point in the history
…_trivial`
  • Loading branch information
nmm0 committed Sep 23, 2022
1 parent 13c86c5 commit 382275a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/vt/messaging/envelope/envelope_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ namespace vt {

using Envelope = messaging::ActiveEnvelope;

static_assert(std::is_pod<Envelope>(), "Envelope must be POD");
static_assert(std::is_trivially_destructible<Envelope>(), "Envelope must be trivially destructible");
static_assert(std::is_standard_layout<Envelope>::value && std::is_trivial<Envelope>::value, "Envelope must be standard layout and trivial");

} /* end namespace vt */

Expand Down
12 changes: 6 additions & 6 deletions src/vt/messaging/envelope/envelope_extended.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ using EpochEnvelope = messaging::EpochActiveEnvelope;
using TagEnvelope = messaging::TagActiveEnvelope;
using EpochTagEnvelope = messaging::EpochTagActiveEnvelope;

static_assert(std::is_pod<EpochEnvelope>(), "EpochEnvelope must be POD");
static_assert(std::is_pod<TagEnvelope>(), "TagEnvelope must be POD");
static_assert(std::is_pod<EpochTagEnvelope>(), "EpochTagEnvelope must be POD");
static_assert(std::is_standard_layout<EpochEnvelope>::value, "EpochEnvelope must be standard layout");
static_assert(std::is_standard_layout<TagEnvelope>::value, "TagEnvelope must be standard layout");
static_assert(std::is_standard_layout<EpochTagEnvelope>::value, "EpochTagEnvelope must be standard layout");
static_assert(
std::is_trivially_destructible<EpochEnvelope>(),
std::is_trivial<EpochEnvelope>::value,
"EpochEnvelope must be trivial"
);
static_assert(
std::is_trivially_destructible<TagEnvelope>(),
std::is_trivial<TagEnvelope>::value,
"TagEnvelope must be trivial"
);
static_assert(
std::is_trivially_destructible<EpochTagEnvelope>(),
std::is_trivial<EpochTagEnvelope>::value,
"EpochTagEnvelope must be trivial"
);

Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/envelope/payload_envelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ inline void envelopeInitEmpty(PutShortEnvelope& env) {
env.put_data_tag_ = no_tag;
}

static_assert(std::is_pod<PutShortEnvelope>(), "PutShortEnvelope must be POD");
static_assert(std::is_standard_layout<PutShortEnvelope>::value && std::is_trivial<PutShortEnvelope>::value, "PutShortEnvelope must be standard layout and trivial");

/**
* \brief Get the put pointer
Expand Down

0 comments on commit 382275a

Please sign in to comment.