Talk:cpp/thread/call once

With GCC, runnning example code yields, variously:
 * Hang ("execution expired")
 * (no output)

No obvious correlation between outputs and GCC version/C++ version (>= C++11), using the Coliru compiler. On my own machine, using GCC 7.5.0, execution consistently hangs.

Probably this bug, as suggested on StackOverflow.

msw_1520 (talk) 18:56, 5 January 2022 (PST)


 * Yes, quite a few cppreference examples expose compiler bugs. Clang got this one right, though. --Cubbi (talk) 20:22, 5 January 2022 (PST)