Just a question. Looking at C++ Boost libraries (in particular boost::thread class) I ended up thinking: "how is it possible to create a class defining objects that cannot be copied but that can be returned from a function?"
Well consider this example, the boost::thread class has the characteristics I mentioned before, so it is possible to do this:
boost::thread make_thread();
void f()
{
boost::thread some_thread=make_thread();
some_thread.join();
}
Well this means that the object boost::thread cannot be copied, but returned from a function, this is possible. How is this possible????
I suppose that a copy constructor must not be provided, but how to deal with returning from a function? doesn't it need to use a copy constructor???
Thankyou