Skip to content

Commit 9e81c2d

Browse files
committed
Debug MSVC failure; cat xatomic.h
1 parent 99ca9aa commit 9e81c2d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,8 @@ jobs:
598598
with:
599599
python-version: ${{ matrix.python }}
600600

601+
- run: cat "c:\program files (x86)\microsoft visual studio 14.0\vc\include\xatomic.h"
602+
601603
- name: Update CMake
602604
uses: jwlawson/[email protected]
603605

tests/test_iostream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void noisy_funct_dual(std::string msg, std::string emsg) {
3131
// simply repeatedly write to std::cerr until stopped
3232
// redirect is called at some point to test the safety of scoped_estream_redirect
3333
struct TestThread {
34-
TestThread() : t_{nullptr}, stop_{false} {
34+
TestThread() : t_{nullptr}, stop_{0} {
3535
auto thread_f = [this] {
3636
while (!stop_) {
3737
std::cout << "x" << std::flush;
@@ -57,7 +57,7 @@ struct TestThread {
5757
}
5858

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

6363

0 commit comments

Comments
 (0)