Migrate away from C++20-deprecated POD type traits

This commit is contained in:
David Blaikie
2023-01-26 00:14:30 +00:00
parent 881194d47c
commit 0e754e114a
2 changed files with 4 additions and 4 deletions

View File

@@ -27,18 +27,18 @@
#include <cstring>
#include <limits>
#include <new>
#include <type_traits>
#include <utility>
DEMANGLE_NAMESPACE_BEGIN
template <class T, size_t N> class PODSmallVector {
static_assert(std::is_pod<T>::value,
"T is required to be a plain old data type");
static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
T Inline[N] = {0};
T Inline[N] = {};
bool isInline() const { return First == Inline; }

View File

@@ -134,7 +134,7 @@ std::unique_ptr<BenchmarkRunner> ExegesisTarget::createUopsBenchmarkRunner(
return std::make_unique<UopsBenchmarkRunner>(State, BenchmarkPhaseSelector);
}
static_assert(std::is_pod<PfmCountersInfo>::value,
static_assert(std::is_trivial_v<PfmCountersInfo>,
"We shouldn't have dynamic initialization here");
const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr,
0u};