mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
fpga_clock: Don't use constexpr for time_points.
These are not constexpr on some compilers.
This commit is contained in:
@@ -22,11 +22,10 @@ class fpga_clock {
|
||||
static fpga_clock::time_point now() noexcept;
|
||||
static constexpr bool is_steady = true;
|
||||
|
||||
static constexpr fpga_clock::time_point epoch() { return time_point(zero()); }
|
||||
static fpga_clock::time_point epoch() noexcept { return time_point(zero()); }
|
||||
|
||||
static constexpr fpga_clock::duration zero() { return duration(0); }
|
||||
static fpga_clock::duration zero() noexcept { return duration(0); }
|
||||
|
||||
static constexpr time_point min_time{
|
||||
time_point(duration(std::numeric_limits<duration::rep>::min()))};
|
||||
static const time_point min_time;
|
||||
};
|
||||
} // namespace hal
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include "llvm/raw_ostream.h"
|
||||
|
||||
namespace hal {
|
||||
constexpr fpga_clock::time_point fpga_clock::min_time;
|
||||
const fpga_clock::time_point fpga_clock::min_time =
|
||||
fpga_clock::time_point(fpga_clock::duration(
|
||||
std::numeric_limits<fpga_clock::duration::rep>::min()));
|
||||
|
||||
fpga_clock::time_point fpga_clock::now() noexcept {
|
||||
int32_t status = 0;
|
||||
|
||||
Reference in New Issue
Block a user