31
General / Re: VS 11, and variadic templates with std::thread
« on: November 06, 2012, 05:53:35 pm »The time you waste pointlessly in "fixing" and asking in forums would be much better invested in reading books. Of course, not everybody learns well from books, but don't use this as an excuse -- there is no way around theory if you want to write good code
I don't expect you to learn about Boost.Function and Boost.Bind, that is why I wrote "the first point is enough". Function objects is really something every C++ programmer should know, so take the time to learn it. This is not something you use once for the thread and then never again, functors will certainly prove useful. Already because STL algorithms operate on them.
Well of course I want to learn just about everything eventually. But for now I'm trying to focus on why my thread won't work. Yea trial and error is a pain. But how else would I ever find out things don't work that way? Sure I can learn a bunch about functors, but it wont actually come out and tell me "this is why your thread is not working." So if I don't understand how the thread is supposed to work, and why my threads arguments are not working now, it would just teach me about functors, then afterwords, I would be in the same situation I am now, only I would know functors. Make sense?