Answer the question
In order to leave comments, you need to log in
C++20 where is jthread located?
I read about the new jthread , I wanted to test it, but the compiler swears that it doesn’t exist. What include is required? 'thread' (in angle brackets) set. I use gcc version 11.1 on Linux, compilation with the g++ test.cpp command
Answer the question
In order to leave comments, you need to log in
It is necessary to specify the language standard in the compilation line, the default is not new:
g++ -std=c++20 test.cpp
Defined in header <thread>
https://en.cppreference.com/w/cpp/thread/jthread
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question