Modify

Opened 22 months ago

Closed 22 months ago

Last modified 6 months ago

#11817 closed Bugs (fixed)

'sync_queue_is_closed' was not declared in boost/thread/executors/thread_executor.hpp

Reported by: Xiaoshuang LU <luxiaoshuang@…> Owned by: viboes
Milestone: Boost 1.60.0 Component: thread
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

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() );

Attachments (0)

Change History (7)

comment:1 Changed 22 months ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 Changed 22 months ago by Xiaoshuang LU <luxiaoshuang@…>

Hi Vibose,

Would you mind to assigning this ticket to me? I will take care of it.

Thanks.

Xiaoshuang LU

comment:3 Changed 22 months ago by viboes

Description: modified (diff)

Hi,

there is a missing

#include <boost/thread/concurrent_queues/queue_op_status.hpp>

comment:4 Changed 22 months ago by viboes

Milestone: To Be DeterminedBoost 1.60.0
Version: Boost 1.60.0Boost 1.59.0

comment:5 in reply to:  3 Changed 22 months ago by Xiaoshuang LU <luxiaoshuang@…>

Yes, you are correct.

Replying to viboes:

Hi,

there is a missing

#include <boost/thread/concurrent_queues/queue_op_status.hpp>

comment:6 Changed 22 months ago by viboes

Resolution: fixed
Status: assignedclosed

comment:7 Changed 6 months ago by tamino@…

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() );

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.