Re: [Boost-bugs] [Boost C++ Libraries] #11817: 'sync_queue_is_closed' was not declared in boost/thread/executors/thread_executor.hpp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11817: 'sync_queue_is_closed' was not declared in boost/thread/executors/thread_executor.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-03-31 20:21:03


#11817: 'sync_queue_is_closed' was not declared in
boost/thread/executors/thread_executor.hpp
---------------------------------------------+---------------------
  Reporter: Xiaoshuang LU <luxiaoshuang@…> | Owner: viboes
      Type: Bugs | Status: closed
 Milestone: Boost 1.60.0 | Component: thread
   Version: Boost 1.59.0 | Severity: Problem
Resolution: fixed | Keywords:
---------------------------------------------+---------------------

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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11817#comment:7>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-03-31 20:23:52 UTC