https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107886

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jamaika from comment #6)
> I don't understand something. Why _GLIBCXX_HAS_GTHREADS works for
> std::jthread but not for std::latch

std::jthread doesn't depend on _GLIBCXX_HAS_GTHREADS, it's always available.
But you might not be able to create a new thread using std::jthread if your
platform doesn't provide what's needed for it to work.

(In reply to Jamaika from comment #10)
> ```
> Using built-in specs.
> COLLECT_GCC=g++.exe
> Target: x86_64-w64-mingw32
> Configured with: /home/ma/m/source/gcc-g/configure --host=x86_64-w64-mingw32
> --target=x86_64-w64-mingw32 --disable-nls
> --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/ma/m/build/for_target
> --with-mpfr=/home/ma/m/build/for_target
> --with-mpc=/home/ma/m/build/for_target
> --with-isl=/home/ma/m/build/for_target --enable-twoprocess
> --disable-libstdcxx-pch --disable-win32-registry --disable-shared
> --enable-fully-dynamic-string --enable-libssp --prefix=/home/ma/m/target
> --with-sysroot=/home/ma/m/target
> Thread model: win32

This is the problem. You need a thread model that provides the support needed
for C++.

Reply via email to