From 9e81c2deaf9d8f8b6f184ed0f72ec72c359722fe Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 18 Nov 2020 22:10:57 +0100 Subject: [PATCH] Debug MSVC failure; cat xatomic.h --- .github/workflows/ci.yml | 2 ++ tests/test_iostream.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73424f92da3..8c86596e047 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -598,6 +598,8 @@ jobs: with: python-version: ${{ matrix.python }} + - run: cat "c:\program files (x86)\microsoft visual studio 14.0\vc\include\xatomic.h" + - name: Update CMake uses: jwlawson/actions-setup-cmake@v1.4 diff --git a/tests/test_iostream.cpp b/tests/test_iostream.cpp index f76f30588d6..957210654f3 100644 --- a/tests/test_iostream.cpp +++ b/tests/test_iostream.cpp @@ -31,7 +31,7 @@ void noisy_funct_dual(std::string msg, std::string emsg) { // simply repeatedly write to std::cerr until stopped // redirect is called at some point to test the safety of scoped_estream_redirect struct TestThread { - TestThread() : t_{nullptr}, stop_{false} { + TestThread() : t_{nullptr}, stop_{0} { auto thread_f = [this] { while (!stop_) { std::cout << "x" << std::flush; @@ -57,7 +57,7 @@ struct TestThread { } std::thread * t_; - std::atomic stop_; + std::atomic stop_; // VS 2015's MSVC doesn't like `std::atomic`: ...\xatomic.h(382): warning C4702: unreachable code };