Skip to content

Commit

Permalink
Debug MSVC failure; cat xatomic.h
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickJadoul committed Nov 18, 2020
1 parent 99ca9aa commit 9e81c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/test_iostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -57,7 +57,7 @@ struct TestThread {
}

std::thread * t_;
std::atomic<bool> stop_;
std::atomic<int> stop_; // VS 2015's MSVC doesn't like `std::atomic<bool>`: ...\xatomic.h(382): warning C4702: unreachable code
};


Expand Down

0 comments on commit 9e81c2d

Please sign in to comment.