Skip to content

Commit

Permalink
counters: change deprecated std::is_pod<> to replacement
Browse files Browse the repository at this point in the history
C++20 deprecates std::is_pod<> in favor of the easier-to-type
std::is_starndard_layout<> && std::is_trivial<>. Change to the
recommendation in order to avoid a flood of warnings.

Reviewed-by: Rafael Ávila de Espíndola <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
avikivity authored and penberg committed May 13, 2020
1 parent 2afd40f commit 33fda05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion counters.hh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public:
return counter_id(utils::make_random_uuid());
}
};
static_assert(std::is_pod<counter_id>::value, "counter_id should be a POD type");
static_assert(
std::is_standard_layout_v<counter_id> && std::is_trivial_v<counter_id>,
"counter_id should be a POD type");

std::ostream& operator<<(std::ostream& os, const counter_id& id);

Expand Down

0 comments on commit 33fda05

Please sign in to comment.