Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. class ThreadPool {
  2.   public:
  3.     ThreadPool(int num_threads);
  4.   [...]
  5. }
  6.  
  7. [...]
  8.  
  9. public std::optional<ThreadPool> CreateThreadPool(int num_threads) {
  10.     std::optional<ThreadPool> thread_pool_optional (ThreadPool(num_threads)); // warning: Parentheses were disambigued as a function declaration. => credea literalmente ca e function declaration
  11.     std::optional<ThreadPool> thread_pool_optional ((ThreadPool(num_threads))); // cu inca un set de paranteze mergea. WTF??
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement