<div dir="ltr">I've just spent a lot of time trying to figure out why a particular class of tests were failing for me with MSVC and not with GCC.<div><br></div><div>For example:</div><div><br></div><div>test\std\thread\thread.condition\thread.condition.condvarany\wait_for.exception.pass.cpp<br></div><div><br></div><div>These tests are designed to check that <i>std::condition_variable::wait_for</i> (and friends) will call <i>std::terminate</i> when an exception is thrown during the re-locking of the passed in mutex.</div><div><br></div><div>Firstly, I think this is C++14 only, at least according to <a href="http://en.cppreference.com/w/cpp/thread/condition_variable/wait_for">http://en.cppreference.com/w/cpp/thread/condition_variable/wait_for</a>.  I know that's not the single source of truth so please correct me if that's not the case.  If it is, then I'd like to comment out these tests in a:</div><div><br></div><div>#if _LIBCPP_STD_VER > 11<br></div><div>#else</div><div>#endif</div><div><br></div><div>block.  </div><div><br></div><div>Secondly, I'd like to add a much more verbose comment as to what these tests are doing and why, ultimately, they will work.  The latter point is the more important.  To implement the expected behaviour the tests rely on the dtr of <i>std::unique_ptr</i> calling a nothrow function and the mutex locking happening from within there (this is why MSVC failed the test as it doesn't call <i>std::terminate</i> if a throw occurs in a nothrow function).</div><div><br></div><div>I'll submit a patch (or not) based on comments.</div><div><br></div><div>Also, on a side not whilst I remember.  The following functions in condition_variable.cpp are marked as NOTHROW but actually can throw:</div><div><br></div><div><div><i>void</i></div><div><i>condition_variable::wait(unique_lock<mutex>& lk)</i></div></div><div><i><br></i></div><div><div><i>void</i></div><div><i>condition_variable::__do_timed_wait(unique_lock<mutex>& lk,</i></div><div><i>     chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp)</i></div></div><div><br></div><div>Seems like a bug to me!  Is it?</div></div>