title: std::condition_variable wait_until surprising behaviour
body: <p>Building with VS2013, specifying <code>time_point::max()</code> to a condition variable's <code>wait_until</code> results in an immediate timeout. </p>
  
  <p>This seems unintuitive - I would naively expect <code>time_point::max()</code> to wait indefinitely (or at least a <em>very</em> long time). Can anyone confirm if this is documented, expected behaviour or something specific to MSVC?</p>
  
  <p>Sample program below; note replacing <code>time_point::max()</code> with <code>now + std::chrono::hours(1)</code> gives the expected behaviour (<code>wait_for</code> exits once cv is notified, with no timeout)</p>
  
  <pre><code>
  #include &lt;condition_variable>
  #include &lt;mutex>
  #include &lt;chrono>
  #include &lt;future>
  #include &lt;functional>
  
  void fire_cv( std::mutex *mx, std::condition_variable *cv )
  {
      std::unique_lock&lt;std::mutex> lock(*mx);
      printf("firing cv\n");
      cv->notify_one();
  }
  
  int main(int argc, char *argv[])
  {
      std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
  
      std::condition_variable test_cv;
      std::mutex test_mutex;
  
      std::future&lt;void> s;
      {
          std::unique_lock&lt;std::mutex> lock(test_mutex);
          s = std::async(std::launch::async, std::bind(fire_cv, &test_mutex, &test_cv));
          printf("blocking on cv\n");
          std::cv_status result = test_cv.wait_until( lock, std::chrono::steady_clock::time_point::max() );
  
          //std::cv_status result = test_cv.wait_until( lock, now + std::chrono::hours(1) ); // &lt;--- this works as expected!
          printf("%s\n", (result==std::cv_status::timeout) ? "timeout" : "no timeout");
      }
      s.wait();
  
      return 0;
  }
  </code></pre>