#11817 closed Bugs (fixed)
'sync_queue_is_closed' was not declared in boost/thread/executors/thread_executor.hpp
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | thread |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description (last modified by )
boost-1.59.0/include/boost/thread/executors/thread_executor.hpp: In member function 'void boost::executors::thread_executor::submit(void (*)())': boost-1.59.0/include/boost/thread/executors/thread_executor.hpp:122:68: error: 'sync_queue_is_closed' was not declared in this scope if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() ); ^ boost-1.59.0/include/boost/thread/executors/thread_executor.hpp: In member function 'void boost::executors::thread_executor::submit(Closure&&)': boost-1.59.0/include/boost/thread/executors/thread_executor.hpp:132:68: error: there are no arguments to 'sync_queue_is_closed' that depend on a template parameter, so a declaration of 'sync_queue_is_closed' must be available [-fpermissive] if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
Change History (7)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
follow-up: 5 comment:3 by , 7 years ago
Description: | modified (diff) |
---|
Hi,
there is a missing
#include <boost/thread/concurrent_queues/queue_op_status.hpp>
comment:4 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|---|
Version: | Boost 1.60.0 → Boost 1.59.0 |
comment:5 by , 7 years ago
Yes, you are correct.
Replying to viboes:
Hi,
there is a missing
#include <boost/thread/concurrent_queues/queue_op_status.hpp>
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 6 years ago
Hello, this bug does still does occur when the order of includes is not correct:
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_PROVIDES_EXECUTORS #include <iostream> #include <thread> #include <list> #include <chrono> #include <boost/thread.hpp> #include <boost/thread/future.hpp> #include <boost/thread/executors/thread_executor.hpp> // include this first which includes queue_op_status.hpp #include <boost/thread/executors/inline_executor.hpp> #include <boost/thread/executors/basic_thread_pool.hpp> #include <boost/thread/executors/loop_executor.hpp>
When I include thread_executor.hpp later I still get this error. I am using Boost 1.63.0 customly build with gcc -std=c++14.
So this version fails:
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_PROVIDES_EXECUTORS #include <iostream> #include <thread> #include <list> #include <chrono> #include <boost/thread.hpp> #include <boost/thread/future.hpp> #include <boost/thread/executors/inline_executor.hpp> #include <boost/thread/executors/basic_thread_pool.hpp> #include <boost/thread/executors/loop_executor.hpp> #include <boost/thread/executors/thread_executor.hpp> // include this first which includes queue_op_status.hpp
with these errors:
/home/tamino/thesis/futures/build/boost/include/boost/thread/executors/inline_executor.hpp: In member function ‘void boost::executors::inline_executor::submit(void (*)())’: /home/tamino/thesis/futures/build/boost/include/boost/thread/executors/inline_executor.hpp:122:70: error: ‘sync_queue_is_closed’ was not declared in this scope if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() ); ^ /home/tamino/thesis/futures/build/boost/include/boost/thread/executors/inline_executor.hpp: In member function ‘void boost::executors::inline_executor::submit(Closure&&)’: /home/tamino/thesis/futures/build/boost/include/boost/thread/executors/inline_executor.hpp:140:70: error: there are no arguments to ‘sync_queue_is_closed’ that depend on a template parameter, so a declaration of ‘sync_queue_is_closed’ must be available [-fpermissive] if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
Note:
See TracTickets
for help on using tickets.
Hi Vibose,
Xiaoshuang LU