std::thread f()
{
void some_function(); // <- here
return std::thread(some_function);
}
std::thread g()
{
void some_other_function(int); // <- here
std::thread t(some_other_function,42);
return t;
}
std::thread f() { void some_function(); // <- here return std::thread(some_function); } std::thread g() {
Share
Lines like:
simply declare a function which will be defined later. Functions don’t necessarily have to be declared outside of function scope.