@@ -142,24 +142,24 @@ namespace gf {
142142 return Time (lhs.as_duration () - rhs.as_duration ());
143143 }
144144
145- template <typename T>
146- constexpr Time operator *(Time lhs, std:: enable_if_t <std::is_arithmetic_v<T>, T> rhs)
145+ template <typename T, std:: enable_if_t <std::is_arithmetic_v<T>, bool > = true >
146+ constexpr Time operator *(Time lhs, T rhs)
147147 {
148- auto duration = lhs * rhs;
148+ auto duration = lhs. as_duration () * rhs;
149149 return Time (std::chrono::duration_cast<details::DurationType>(duration));
150150 }
151151
152- template <typename T>
153- constexpr Time operator *(std:: enable_if_t <std::is_arithmetic_v<T>, T> lhs, Time rhs)
152+ template <typename T, std:: enable_if_t <std::is_arithmetic_v<T>, bool > = true >
153+ constexpr Time operator *(T lhs, Time rhs)
154154 {
155- auto duration = lhs * rhs;
155+ auto duration = lhs * rhs. as_duration () ;
156156 return Time (std::chrono::duration_cast<details::DurationType>(duration));
157157 }
158158
159- template <typename T>
160- constexpr Time operator /(Time lhs, std:: enable_if_t <std::is_arithmetic_v<T>, T> rhs)
159+ template <typename T, std:: enable_if_t <std::is_arithmetic_v<T>, bool > = true >
160+ constexpr Time operator /(Time lhs, T rhs)
161161 {
162- auto duration = lhs / rhs;
162+ auto duration = lhs. as_duration () / rhs;
163163 return Time (std::chrono::duration_cast<details::DurationType>(duration));
164164 }
165165
0 commit comments