I would like to be able to use a jthread in a program I'm working on and also to better understand how to use library features. Here is some code I've tried testing it with by commenting and uncommenting some of the macros.
#include <iostream>
#undef _GLIBCXX_HAS_GTHREADS
#define _GLIBCXX_HAS_GTHREADS true
//#define __cpp_lib_jthread
#include <version>
#include <stop_token>
//#define __cpp_lib_jthread
#include <thread>
#define log(x) std::cout << x << std::endl;
using namespace std;
int main() {
jthread j ([&] {
log("lmao");
b = false;
});
}