mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-27 13:32:43 +02:00
timespan: explicitly require TimeSpanType as is_pod
This commit is contained in:
parent
164927b3ba
commit
36616d6e0b
@ -17,6 +17,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <vapours/common.hpp>
|
#include <vapours/common.hpp>
|
||||||
#include <vapours/assert.hpp>
|
#include <vapours/assert.hpp>
|
||||||
|
#include <vapours/util/util_type_traits.hpp>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
namespace ams {
|
namespace ams {
|
||||||
@ -54,6 +55,7 @@ namespace ams {
|
|||||||
constexpr ALWAYS_INLINE friend TimeSpanType operator+(const TimeSpanType &lhs, const TimeSpanType &rhs) { TimeSpanType r(lhs); return r += rhs; }
|
constexpr ALWAYS_INLINE friend TimeSpanType operator+(const TimeSpanType &lhs, const TimeSpanType &rhs) { TimeSpanType r(lhs); return r += rhs; }
|
||||||
constexpr ALWAYS_INLINE friend TimeSpanType operator-(const TimeSpanType &lhs, const TimeSpanType &rhs) { TimeSpanType r(lhs); return r -= rhs; }
|
constexpr ALWAYS_INLINE friend TimeSpanType operator-(const TimeSpanType &lhs, const TimeSpanType &rhs) { TimeSpanType r(lhs); return r -= rhs; }
|
||||||
};
|
};
|
||||||
|
static_assert(util::is_pod<TimeSpanType>::value);
|
||||||
|
|
||||||
class TimeSpan {
|
class TimeSpan {
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user