mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 10:57:16 +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;
|
||||
else if constexpr (is_same_v<Period, std::chrono::days::period>)
|
||||
return day;
|
||||
else if constexpr (is_same_v<Period, std::chrono::weeks::period>)
|
||||
return mag<7> * day;
|
||||
else
|
||||
return mag<ratio{Period::num, Period::den}> * second;
|
||||
}
|
||||
|
Reference in New Issue
Block a user