/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
#include <thread>
#include <ranges>
#include <algorithm>
using namespace std;
int main()
{
cout<<"Hello from main " << std::this_thread::get_id() << endl;
jthread th([](){
cout<<"Hello from jthread " << std::this_thread::get_id() << endl;
std::ranges::for_each(std::views::iota(1) | std::views::take(10), [](int x){
cout << x << "\n";
});
});
return 0;
}