mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Replace std::is_pod_v with std::is_standard_layout_v (#2159)
The former is deprecated in C++20.
This commit is contained in:
committed by
Peter Johnson
parent
67d2fed685
commit
5c6b8a0f45
@@ -11,6 +11,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
#include "AnalogInternal.h"
|
||||
#include "DigitalInternal.h"
|
||||
@@ -28,7 +29,8 @@
|
||||
|
||||
using namespace hal;
|
||||
|
||||
static_assert(std::is_pod_v<HAL_DMASample>, "DMA Sample must be POD");
|
||||
static_assert(std::is_standard_layout_v<HAL_DMASample>,
|
||||
"HAL_DMASample must have standard layout");
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <hal/AnalogInput.h>
|
||||
#include <hal/DMA.h>
|
||||
#include <units/units.h>
|
||||
@@ -104,5 +106,6 @@ class DMASample : public HAL_DMASample {
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(std::is_pod_v<frc::DMASample>, "DMA Sample MUST Be POD");
|
||||
static_assert(std::is_standard_layout_v<frc::DMASample>,
|
||||
"frc::DMASample must have standard layout");
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user