mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 19:34:29 +02:00
feat: now "7 days" will be created for std::chrono::weeks
instead of a quantity in seconds
This commit is contained in:
@@ -52,6 +52,8 @@ template<typename Period>
|
|||||||
return hour;
|
return hour;
|
||||||
else if constexpr (is_same_v<Period, std::chrono::days::period>)
|
else if constexpr (is_same_v<Period, std::chrono::days::period>)
|
||||||
return day;
|
return day;
|
||||||
|
else if constexpr (is_same_v<Period, std::chrono::weeks::period>)
|
||||||
|
return mag<7> * day;
|
||||||
else
|
else
|
||||||
return mag<ratio{Period::num, Period::den}> * second;
|
return mag<ratio{Period::num, Period::den}> * second;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user