1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-09 21:51:45 +00:00

timespan: explicitly require TimeSpanType as is_pod

This commit is contained in:
Michael Scire 2021-01-25 08:27:42 -08:00
parent 3389aaefc3
commit 48830d190f

View file

@ -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: