By doing:
std::vector<int> vec; int number = 4; boost::thread workerThread(&Method, number, vec) given a method: template<typename T> void Method(int n, std::vector<T> & vec) { //does stuff }
Why do I have to do it manually:
boost::thread workerThread(&Method, number, boost::ref(vec))?
Why doesn't it automatically pass it by reference?
Edit :: so it is theoretically possible for boost :: thread to do macro meta programming to adjust this, since C ++ has nothing like building in reflection / introspection.
So, the main part of boost / C ++ generally transmits meta information around?
source share