28class Timeout :
public std::optional<std::chrono::duration<int64_t, Ratio>> {
30 template <
typename Ratio2>
using Dur = std::chrono::duration<int64_t, Ratio2>;
31 template <
typename Rep2,
typename Ratio2>
33 std::is_convertible<std::chrono::duration<Rep2, Ratio2>,
34 std::chrono::duration<int64_t, Ratio>>::value>;
36 using Base = std::optional<Dur<Ratio>>;
41 template <
typename Ratio2,
42 typename =
typename EnableIf<int64_t, Ratio2>::type>
44 :
Base(other ?
Base(
Dur<Ratio>(*other)) : std::nullopt) {}
46 template <
typename Rep2,
typename Ratio2,
47 typename =
typename EnableIf<Rep2, Ratio2>::type>
48 Timeout(
const std::chrono::duration<Rep2, Ratio2> &other)