http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58038
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-07-31
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
On second thoughts, <chrono> is doing everything as specified by the standard.
It seems unfortunate that we need this, but I don't immediately see any way
around it. I think I'd prefer to do this than use SFINAE:
template<typename _Clock, typename _Duration>
inline void
sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
{
auto __now = _Clock::now();
// check if we should sleep till a time point in past
if (std::is_unsigned<typename _Duration::rep>::value && __atime <= __now)
return;
sleep_for(__atime - __now);
}