fork download
  1. // unko.h
  2. #if !defined(UNKO_H_)
  3. #define UNKO_H_
  4.  
  5. #include <mutex> // for mutex, unique_lock.
  6.  
  7.  
  8. template<typename T>
  9. struct gurobaru_vars
  10. {
  11. static std::mutex unko_lock;
  12. };
  13.  
  14. template<typename T>
  15. std::mutex gurobaru_vars<T>::unko_lock;
  16.  
  17. template
  18. struct gurobaru_vars<void>;
  19.  
  20. inline void f()
  21. {
  22. std::unique_lock<std::mutex> xl(gurobaru_vars<void>::unko_lock);
  23. }
  24.  
  25. #endif // UNKO_H_
  26.  
  27.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty