template <class... Args> bool try_##name(Args &&... args) noexcept \
{ \
auto r = name(std::forward<Args>(args)..., std::chrono::seconds(0)); \
return !!r; \
} \
template <class... Args, class Rep, class Period> bool try_##name##_for(Args &&... args, const std::chrono::duration<Rep, Period> &duration) noexcept \
{ \
auto r = name(std::forward<Args>(args)..., duration); \
return !!r; \
} \
template <class... Args, class Clock, class Duration> \
bool try_##name##_until(Args &&... args, const std::chrono::time_point<Clock, Duration> &timeout) noexcept \
{ \
auto r = name(std::forward<Args>(args)..., timeout); \
return !!r; \
}
179 { \
180 auto r = name(std::forward<Args>(args)..., std::chrono::seconds(0)); \
181 return !!r; \
182 } \
183 template <class... Args, class Rep, class Period> bool try_##name##_for(Args &&... args, const std::chrono::duration<Rep, Period> &duration) noexcept \
184 { \
185 auto r = name(std::forward<Args>(args)..., duration); \
186 return !!r; \
187 } \
188 template <class... Args, class Clock, class Duration> \
189 bool try_##name##_until(Args &&... args, const std::chrono::time_point<Clock, Duration> &timeout) noexcept \
190 { \
191 auto r = name(std::forward<Args>(args)..., timeout); \
192 return !!r; \
193 }