mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-17 05:11:01 +00:00
timespan: explicitly require TimeSpanType as is_pod
This commit is contained in:
parent
3389aaefc3
commit
48830d190f
@ -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