This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 5th, 2012  |  syntax: C++  |  size: 0.25 KB  |  views: 62  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <thread>
  2. #include <boost/thread/tss.hpp>
  3.  
  4. class Run{
  5.   public:
  6.     void operator()() const{
  7.     }
  8.  private:
  9.     boost::thread_specific_ptr<int> local;
  10. };
  11.  
  12.  
  13. int main(int argc, char *argv[]){
  14.   Run run;
  15.   thread t(run);
  16.   return 0;
  17. }
clone this paste RAW Paste Data