This worked perfectly (and then the aliens must have hacked into my computer):
#include <thread> #include <iostream> int main() { std::cout << std::this_thread::get_id() << std::endl; return 0; }
and now it prints thread::id of a non-executing thread .
ideone.com prints some identifier, but it is interesting what could cause this behavior on my platform.
$ uname -a Linux xxx 3.13.0-77-generic
Any ideas?
EDIT: Well .. when I add
std::cout << pthread_self() << std::endl;
the lines print the same identifier, but when I delete it, the result remains the same - "non-execution of the stream."
source share