1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
-- Conan: Adjusting output directories
-- Conan: Using cmake targets configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: /ch09_02_threadpool_func_wrap/build
-- Conan: Compiler GCC>=5, checking major version 9
-- Conan: Checking correct version: 9
-- Configuring done
-- Generating done
-- Build files have been written to: /ch09_02_threadpool_func_wrap/build
[ 33%] Building CXX object CMakeFiles/test_cpp_multi.dir/src/helloworld.cpp.o
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp: In instantiation of ‘bool thread_safe_queue<T>::try_pop(T&) [with T = function_wrapper]’:
/ch09_02_threadpool_func_wrap/src/helloworld.cpp:71:39: required from here
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:46:19: error: use of deleted function ‘function_wrapper& function_wrapper::operator=(const function_wrapper&)’
46 | value = queue.front();
/ch09_02_threadpool_func_wrap/src/helloworld.cpp:50:23: note: declared here
50 | function_wrapper& operator=(const function_wrapper&)=delete;
| ^~~~~~~~
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp: In instantiation of ‘void thread_safe_queue<T>::wait_and_pop(T&) [with T = function_wrapper]’:
/ch09_02_threadpool_func_wrap/src/helloworld.cpp:137:16: required from here
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:28:19: error: use of deleted function ‘function_wrapper& function_wrapper::operator=(const function_wrapper&)’
28 | value = queue.front();
/ch09_02_threadpool_func_wrap/src/helloworld.cpp:50:23: note: declared here
50 | function_wrapper& operator=(const function_wrapper&)=delete;
| ^~~~~~~~
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp: In instantiation of ‘std::shared_ptr<_Tp> thread_safe_queue<T>::try_pop() [with T = function_wrapper]’:
/ch09_02_threadpool_func_wrap/src/helloworld.cpp:137:16: required from here
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:56:41: error: no matching function for call to ‘std::shared_ptr<std::mutex>::shared_ptr(<brace-enclosed initializer list>)’
56 | std::shared_ptr<std::mutex> res{std::make_shared<T>(queue.front())};
| ^~~
In file included from /usr/include/c++/9/memory:81,
from /usr/include/c++/9/thread:39,
from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:367:7: note: candidate: ‘std::shared_ptr<_Tp>::shared_ptr(const std::weak_ptr<_Tp>&, std::nothrow_t) [with _Tp = std::mutex]’
367 | shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t)
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:367:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/9/bits/shared_ptr.h:358:2: note: candidate: ‘template<class _Alloc, class ... _Args> std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...)’
358 | shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args)
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:358:2: note: template argument deduction/substitution failed:
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:56:41: note: ‘std::shared_ptr<function_wrapper>’ is not derived from ‘std::_Sp_alloc_shared_tag<_Tp>’
56 | std::shared_ptr<std::mutex> res{std::make_shared<T>(queue.front())};
| ^~~
In file included from /usr/include/c++/9/memory:81,
from /usr/include/c++/9/thread:39,
from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:307:17: note: candidate: ‘constexpr std::shared_ptr<_Tp>::shared_ptr(std::nullptr_t) [with _Tp = std::mutex; std::nullptr_t = std::nullptr_t]’
307 | constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { }
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:307:28: note: no known conversion for argument 1 from ‘std::shared_ptr<function_wrapper>’ to ‘std::nullptr_t’
307 | constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { }
| ^~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:299:2: note: candidate: ‘template<class _Yp, class _Del, std::shared_ptr<std::mutex>::_Constructible<std::unique_ptr<_Tp, _Dp>, std::__sp_array_delete>* <anonymous> > std::shared_ptr<_Tp>::shared_ptr(std::unique_ptr<_Up, _Ep>&&)’
299 | shared_ptr(unique_ptr<_Yp, _Del>&& __r)
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:299:2: note: template argument deduction/substitution failed:
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:56:41: note: ‘std::shared_ptr<function_wrapper>’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’
56 | std::shared_ptr<std::mutex> res{std::make_shared<T>(queue.front())};
| ^~~
In file included from /usr/include/c++/9/memory:81,
from /usr/include/c++/9/thread:39,
from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:290:2: note: candidate: ‘template<class _Yp, class _Del, class> std::shared_ptr<_Tp>::shared_ptr(std::unique_ptr<_Up, _Ep>&&)’
290 | shared_ptr(unique_ptr<_Yp, _Del>&& __r)
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:290:2: note: template argument deduction/substitution failed:
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:56:41: note: ‘std::shared_ptr<function_wrapper>’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’
56 | std::shared_ptr<std::mutex> res{std::make_shared<T>(queue.front())};
| ^~~
In file included from /usr/include/c++/9/memory:81,
from /usr/include/c++/9/thread:39,
from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:282:2: note: candidate: ‘template<class _Yp, class> std::shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Up>&&)’
282 | shared_ptr(auto_ptr<_Yp>&& __r);
| ^~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:282:2: note: template argument deduction/substitution failed:
In file included from /ch09_02_threadpool_func_wrap/src/helloworld.cpp:13:
/ch09_02_threadpool_func_wrap/src/thread_safe_queue.cpp:56:41: note: ‘std::shared_ptr<function_wrapper>’ is not derived from ‘std::auto_ptr<_Up>’
56 | std::shared_ptr<std::mutex> res{std::make_shared<T>(queue.front())};
| ^~~
In file included from /usr/include/c++/9/memory:81,
|